/* ========================================
   RADIAL FAB MENU - PREMIUM MOBILE NAVIGATION
   ======================================== */

/* Hide on desktop */
.fab-menu-container {
  display: none;
}

@media (max-width: 768px) {
  .fab-menu-container {
    display: block;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
  }

  /* Main FAB Button - Phoenix Logo */
  .fab-button {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #001a4d 0%, #003087 100%);
    box-shadow: 
      0 8px 24px rgba(0, 26, 77, 0.4),
      0 0 40px rgba(255, 215, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 3px solid rgba(255, 215, 0, 0.5);
    position: relative;
    overflow: hidden;
    z-index: 10000;
  }

  .fab-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
      45deg,
      transparent,
      rgba(255, 215, 0, 0.1),
      transparent
    );
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
  }

  @keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
  }

  .fab-button img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.6));
    position: relative;
    z-index: 1;
  }

  .fab-button:active {
    transform: scale(0.9);
  }

  .fab-button.active {
    transform: rotate(135deg);
    box-shadow: 
      0 12px 32px rgba(0, 26, 77, 0.6),
      0 0 60px rgba(255, 215, 0, 0.5);
  }

  /* Overlay - positioned outside container */
  .fab-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 26, 77, 0.85);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 9998;
    display: none;
  }
  
  @media (max-width: 768px) {
    .fab-overlay {
      display: block;
    }
  }

  .fab-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  /* Radial Menu Items */
  .fab-items {
    position: absolute;
    bottom: 0;
    right: 0;
    pointer-events: none;
    z-index: 9999;
  }
  
  .fab-items.active {
    pointer-events: all;
  }

  .fab-item {
    position: absolute;
    bottom: 35px;
    right: 35px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    box-shadow: 
      0 6px 20px rgba(255, 215, 0, 0.4),
      0 0 30px rgba(255, 215, 0, 0.3),
      inset 0 2px 8px rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: scale(0) translate(0, 0);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
    text-decoration: none;
    border: 2px solid rgba(0, 26, 77, 0.2);
  }

  .fab-items.active .fab-item {
    opacity: 1;
    transform: scale(1);
    pointer-events: all;
  }

  /* 3D Gold Icon Effect using SVG filters */
  .fab-item-icon {
    width: 30px;
    height: 30px;
    margin-bottom: 3px;
    filter: 
      drop-shadow(0 2px 4px rgba(0, 26, 77, 0.4))
      drop-shadow(0 1px 2px rgba(255, 255, 255, 0.3));
  }

  .fab-item-label {
    font-size: 6px;
    font-weight: 600;
    color: #001a4d;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-shadow: 
      0 1px 0 rgba(255, 255, 255, 0.9),
      0 2px 3px rgba(255, 255, 255, 0.5),
      0 0 8px rgba(255, 255, 255, 0.7);
    line-height: 1;
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 4px;
    border-radius: 3px;
  }

  /* Radial Positions - Pentagon layout - SHIFTED LEFT FOR BETTER SPACING */
  .fab-items.active .fab-item:nth-child(1) {
    transform: scale(1) translate(-140px, -50px); /* HOME - further left and down */
    transition-delay: 0.05s;
  }

  .fab-items.active .fab-item:nth-child(2) {
    transform: scale(1) translate(-125px, -135px); /* ABOUT - left and up */
    transition-delay: 0.1s;
  }

  .fab-items.active .fab-item:nth-child(3) {
    transform: scale(1) translate(-45px, -170px); /* SERVICES - center top */
    transition-delay: 0.15s;
  }

  .fab-items.active .fab-item:nth-child(4) {
    transform: scale(1) translate(35px, -135px); /* BLOG - slight right and up */
    transition-delay: 0.2s;
  }

  .fab-items.active .fab-item:nth-child(5) {
    transform: scale(1) translate(45px, -50px); /* CONTACT - moderate right, AWAY FROM EDGE */
    transition-delay: 0.25s;
  }

  /* Hover effects */
  .fab-item:hover {
    transform: scale(1.05);
    box-shadow: 
      0 10px 30px rgba(255, 215, 0, 0.6),
      0 3px 15px rgba(255, 215, 0, 0.4),
      inset 0 2px 12px rgba(255, 255, 255, 0.5),
      0 0 20px rgba(255, 215, 0, 0.8);
    background: linear-gradient(135deg, #ffed4e 0%, #ffd700 50%, #ffed4e 100%);
  }
  
  .fab-item:hover .fab-item-label {
    background: rgba(255, 255, 255, 0.5);
  }
  
  .fab-item:active {
    transform: scale(0.9) translate(var(--tx), var(--ty)) !important;
    box-shadow: 
      0 4px 12px rgba(255, 215, 0, 0.6),
      0 0 20px rgba(255, 215, 0, 0.5);
  }

  /* Services Submenu Popup */
  .services-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 90%;
    max-width: 360px;
    max-height: 80vh;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 24px;
    box-shadow: 
      0 20px 60px rgba(0, 26, 77, 0.3),
      0 0 40px rgba(255, 215, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 10001;
    overflow: hidden;
  }

  .services-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
  }

  .services-popup-header {
    background: linear-gradient(135deg, #001a4d 0%, #003087 100%);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .services-popup-title {
    color: #ffd700;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
  }

  .services-popup-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.2);
    border: 2px solid rgba(255, 215, 0, 0.4);
    color: #ffd700;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .services-popup-close:active {
    transform: scale(0.9);
    background: rgba(255, 215, 0, 0.3);
  }

  .services-popup-content {
    padding: 8px;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
  }

  .services-popup-item {
    display: flex;
    align-items: center;
    padding: 16px;
    margin: 4px 0;
    background: white;
    border-radius: 16px;
    text-decoration: none;
    color: #001a4d;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
  }

  .services-popup-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.1) 0%, transparent 100%);
    transition: width 0.3s ease;
  }

  .services-popup-item:active::before {
    width: 100%;
  }

  .services-popup-item:active {
    border-color: rgba(255, 215, 0, 0.3);
    transform: translateX(4px);
  }

  .services-popup-item-icon {
    width: 40px;
    height: 40px;
    margin-right: 12px;
    min-width: 40px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.3));
    transition: all 0.3s ease;
  }

  .services-popup-item:active .services-popup-item-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 16px rgba(255, 215, 0, 0.6));
  }

  .services-popup-item-text {
    font-size: 11px;
    font-weight: 600;
    flex: 1;
  }

  .services-popup-item-arrow {
    color: #ffd700;
    font-size: 16px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
  }

  .services-popup-item:active .services-popup-item-arrow {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Hide on discovery forms */
body.discovery-form .fab-menu-container {
  display: none !important;
}
