/* Territory Popup Modal */
.territory-popup-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.territory-popup-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.territory-popup-modal.active .territory-popup-backdrop {
    pointer-events: auto;
}

/* Backdrop overlay - lighter for hover effect */
.territory-popup-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    z-index: 1;
    pointer-events: none;
}

/* Popup Container */
.territory-popup-container {
    position: relative;
    z-index: 2;
    width: 90vw;
    max-width: 680px;
    background: white;
    border-radius: 40px;
    box-shadow: 0 25px 50px -12px rgba(99, 102, 241, 0.2);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.territory-popup-modal.active .territory-popup-container {
    transform: scale(1) translateY(0);
}

/* Page-wide background sparkles */
.territory-background-bursts-page {
    position: absolute;
    inset: 0;
    overflow: visible;
    pointer-events: none;
    user-select: none;
    z-index: 1;
    opacity: 0.6;
}

.territory-spark-page {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 0;
    height: 0;
    transform: scale(var(--spark-scale, 1));
}

.territory-spark-ray-page {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: center;
}

.territory-ray-line-page {
    display: flex;
    align-items: center;
    gap: 2px;
}

.territory-ray-line-item-page {
    width: 14px;
    height: 2.5px;
    background: var(--spark-color, #818cf8);
    border-radius: 9999px;
    opacity: 0.6;
    box-shadow: 0 0 6px var(--spark-color, #818cf8);
}

.territory-ray-dot-page {
    width: 5px;
    height: 5px;
    background: var(--spark-color, #a78bfa);
    border-radius: 9999px;
    opacity: 0.7;
    box-shadow: 0 0 8px var(--spark-color, #a78bfa), 0 0 15px var(--spark-color, #a78bfa);
}

/* Popup Content */
.territory-popup-content {
    position: relative;
    padding: 48px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    z-index: 10;
    min-height: 360px;
    background: #ffffff85;

}

/* Close Button */
.territory-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    z-index: 100;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 991px) {
    .territory-popup-close {
        top: 1px;
        right: 0px;
    }
}

.territory-popup-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1e293b;
    transform: rotate(90deg);
}

/* Background Firecracker Bursts */
.territory-background-bursts {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
    z-index: 1;
    opacity: 0.7;
}

.territory-spark {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 0;
    height: 0;
}

.territory-spark-ray {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: center;
}

.territory-ray-line {
    display: flex;
    align-items: center;
    gap: 1px;
}

.territory-ray-line-item {
    width: 7px;
    height: 1.2px;
    background: #16A34A;
    border-radius: 9999px;
    opacity: 0.6;
}

.territory-ray-dot {
    width: 2px;
    height: 2px;
    background: #DC2626;
    border-radius: 9999px;
    opacity: 0.7;
}

.territory-popup-title {
    position: relative;
    z-index: 20;
    font-size: 32px !important;
    font-weight: 600;
    color: #000000DE;
    margin-bottom: 24px;
    line-height: 1.25;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

@media (min-width: 768px) {
    .territory-popup-title {
        font-size: 28px !important;
    }
}

.territory-popup-description {
    position: relative;
    z-index: 20;
    color: #444444 !important;
    margin-top: 12px;
    margin-bottom: 32px;
    line-height: 1.625;
    font-size: 16px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.territory-popup-button {
    position: relative;
    z-index: 20;
    width: 100%;
    max-width: 320px;
    background: #f1f1f1;
    color: #0f172a;
    font-weight: 500;
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: visible;
}
 
 

.territory-popup-close:hover span{
    position: absolute;
    right: 0px;
    left: 0px;
    top: 4px;
}

.territory-popup-close span{
    position: relative;
    top: -2px;
}



/* Main Firecracker Burst Animation */
.territory-main-burst {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 100;
    width: 0;
    height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.territory-burst-ray {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: center;
}

.territory-burst-ray-line {
    display: flex;
    align-items: center;
    gap: 2px;
}

.territory-burst-line {
    width: 12px;
    height: 1.5px;
    background: #DC2626;
    border-radius: 9999px;
}

.territory-burst-dot {
    width: 3px;
    height: 3px;
    background: #F59E0B;
    border-radius: 9999px;
    box-shadow: 0 0 6px rgba(220, 38, 38, 0.8), 0 0 12px rgba(245, 158, 11, 0.6);
}

/* Animations */
@keyframes territory-firework-burst-move {
    0% {
        transform: translateX(8px) scale(0.8);
        opacity: 0;
    }
    15% {
        opacity: 1;
    }
    100% {
        transform: translateX(32px) scale(1);
        opacity: 0;
    }
}

@keyframes territory-firework-bg-loop {
    0% {
        transform: translateX(6px) scale(0.5);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    15% {
        transform: translateX(20px) scale(1);
        opacity: 0;
    }
    100% {
        opacity: 0;
        transform: translateX(20px) scale(1);
    }
}

@keyframes territory-firework-page-loop {
    0% {
        transform: translateX(10px) scale(0.3);
        opacity: 0;
    }
    3% {
        opacity: 1;
    }
    20% {
        transform: translateX(50px) scale(1.2);
        opacity: 0.8;
    }
    40% {
        transform: translateX(80px) scale(1);
        opacity: 0;
    }
    100% {
        opacity: 0;
        transform: translateX(80px) scale(1);
    }
}

/* Animated border + glow for breadcrumb button */
@keyframes gradient-border {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes pulse-glow {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.6;
    }
}

/* Gradient border + glow animations for CTA */
@keyframes territory-gradient-border {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes territory-pulse-glow {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.35;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.08);
        opacity: 0.7;
    }
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .territory-popup-content {
        padding: 32px 20px;
        min-height: 320px;
    }
    
    .territory-popup-container {
        border-radius: 20px;
    }
    
    .territory-popup-title {
        font-size: 24px !important;
    }
    
    .territory-popup-description {
        font-size: 14px;
    }
}


.breadcrumb-button-index {
    background-color: #ffffff;
    border: 2px solid transparent;
    border-radius: 50px;
    box-shadow: 0px 3px 12px 0px rgba(158, 162, 174, 0.2392156863);
    padding: 12px 24px;
    color: #1E1E1E;
    font-weight: 500;
    font-family: "DM Sans";
    font-size: 16px;
    margin-bottom: 26px;
    cursor: pointer !important;
    position: relative;
    overflow: visible;
    transition: all 0.3s ease;
    background-clip: padding-box;
}

@media (min-width: 320px) and (max-width: 768px) {
    .breadcrumb-button-index {
        margin-top: 48px;
    }
}

/* Animated gradient border - always visible */
.breadcrumb-button-index::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50px;
    background: linear-gradient(45deg, #DC2626, #16A34A, #F59E0B, #6366f1, #DC2626);
    background-size: 300% 300%;
    z-index: -1;
    animation: gradient-border 3s ease infinite;
  }
  
  /* Subtle pulsing glow effect - always visible */
  .breadcrumb-button-index::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    opacity: 1;
    animation: pulse-glow 2s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
  }
  
  @keyframes gradient-border {
    0% {
      background-position: 0% 50%;
    }
    50% {
      background-position: 100% 50%;
    }
    100% {
      background-position: 0% 50%;
    }
  }
  
  @keyframes pulse-glow {
    0%, 100% {
      transform: translate(-50%, -50%) scale(1);
      opacity: 0.3;
    }
    50% {
      transform: translate(-50%, -50%) scale(1.1);
      opacity: 0.6;
    }
  }