/* ==========================================
   GLOBAL TECH BACKGROUND - Grid & Particles
   ========================================== */

/* Main background container */
.global-tech-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: #050505;
}

/* Radial gradient overlay */
.global-tech-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(38, 211, 0, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(38, 211, 0, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(38, 211, 0, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

/* Grid Pattern */
.global-tech-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(38, 211, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(38, 211, 0, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

/* Animated Lines Container */
.global-tech-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Individual animated lines */
.global-tech-lines .tech-line {
    position: absolute;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, 
        transparent,
        rgba(38, 211, 0, 0.3),
        transparent
    );
    animation: techLineMove 8s ease-in-out infinite;
}

.global-tech-lines .tech-line:nth-child(1) { left: 10%; animation-delay: 0s; }
.global-tech-lines .tech-line:nth-child(2) { left: 25%; animation-delay: 2s; }
.global-tech-lines .tech-line:nth-child(3) { left: 40%; animation-delay: 4s; }
.global-tech-lines .tech-line:nth-child(4) { left: 55%; animation-delay: 1s; }
.global-tech-lines .tech-line:nth-child(5) { left: 70%; animation-delay: 3s; }
.global-tech-lines .tech-line:nth-child(6) { left: 85%; animation-delay: 5s; }

@keyframes techLineMove {
    0%, 100% {
        transform: translateY(-100%);
        opacity: 0;
    }
    50% {
        transform: translateY(100%);
        opacity: 1;
    }
}

/* Floating Particles Container */
.global-tech-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Individual particles */
.global-tech-particles .tech-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #26d300;
    border-radius: 50%;
    opacity: 0.3;
    animation: techParticleFloat 15s ease-in-out infinite;
}

.global-tech-particles .tech-particle:nth-child(1) { left: 15%; top: 20%; animation-delay: 0s; animation-duration: 12s; }
.global-tech-particles .tech-particle:nth-child(2) { left: 85%; top: 30%; animation-delay: 2s; animation-duration: 14s; }
.global-tech-particles .tech-particle:nth-child(3) { left: 25%; top: 70%; animation-delay: 4s; animation-duration: 16s; }
.global-tech-particles .tech-particle:nth-child(4) { left: 75%; top: 80%; animation-delay: 1s; animation-duration: 13s; }
.global-tech-particles .tech-particle:nth-child(5) { left: 50%; top: 10%; animation-delay: 3s; animation-duration: 15s; }
.global-tech-particles .tech-particle:nth-child(6) { left: 10%; top: 50%; animation-delay: 5s; animation-duration: 11s; }
.global-tech-particles .tech-particle:nth-child(7) { left: 90%; top: 60%; animation-delay: 2.5s; animation-duration: 17s; }
.global-tech-particles .tech-particle:nth-child(8) { left: 40%; top: 90%; animation-delay: 1.5s; animation-duration: 14s; }

@keyframes techParticleFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translate(30px, -30px) scale(1.5);
        opacity: 0.6;
    }
    50% {
        transform: translate(-20px, -60px) scale(1);
        opacity: 0.3;
    }
    75% {
        transform: translate(40px, -30px) scale(1.2);
        opacity: 0.5;
    }
}

/* Hide local line_animation elements since we have global ones */
.line_animation {
    display: none !important;
}

/* ==========================================
   OPAQUE SECTIONS - Hide lines behind these
   ========================================== */

/* Sections with backgrounds should be opaque */
.ori-service-wrapper-1,
.ori-footer-section,
.ori-cta-section,
.ori-about-section,
.ori-counter-section,
.ori-testimonial-section,
.ori-team-section,
.ori-blog-section,
.ori-partner-section,
.ori-sponsor-section,
.ori-pricing-section,
.ori-faq-section,
footer,
[class*="footer"],
[style*="background-color"],
[style*="background-image"] {
    position: relative;
    z-index: 1;
}

/* Ensure dark backgrounds are truly opaque */
.ori-service-wrapper-1,
.ori-footer-section,
footer {
    background-color: #171717;
}

/* ==========================================
   PAGE HERO - Text & UI Styles
   ========================================== */

/* Override default padding for enhanced content */
.ori-breadcrumbs-section.page-hero .ori-breadcrumb-content,
.ori-breadcrumbs-section.service-hero .ori-breadcrumb-content {
    padding: 0;
}

/* Hero sections should show lines through */
.ori-breadcrumbs-section,
.page-hero,
.service-hero {
    position: relative;
    z-index: 1;
    background: transparent !important;
}

/* Content */
.page-hero__content,
.service-hero__content {
    max-width: 900px;
    margin: 0 auto;
    padding: 200px 0 120px;
    position: relative;
    z-index: 2;
}

/* Breadcrumbs - Pill Style */
.page-hero__breadcrumbs,
.service-hero__breadcrumbs {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    backdrop-filter: blur(10px);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.page-hero__breadcrumb-link,
.service-hero__breadcrumb-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-hero__breadcrumb-link:hover,
.service-hero__breadcrumb-link:hover {
    color: #26d300;
}

.page-hero__breadcrumb-separator,
.service-hero__breadcrumb-separator {
    color: #26d300;
    font-weight: 700;
}

.page-hero__breadcrumb-current,
.service-hero__breadcrumb-current {
    color: #fff;
}

/* Title with Glow */
.page-hero__title,
.service-hero__title {
    margin: 32px 0 20px;
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.15;
    color: #fff;
}

.page-hero__title-text,
.service-hero__title-text {
    display: inline-block;
    background: linear-gradient(135deg, #fff 0%, #f0fff0 50%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    position: relative;
}

.page-hero__title-text::after,
.service-hero__title-text::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    z-index: -1;
    background: linear-gradient(135deg, #26d300, #1fa300);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: blur(30px);
    opacity: 0.5;
}

/* Subtitle */
.page-hero__subtitle,
.service-hero__subtitle {
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.65);
    max-width: 700px;
    margin: 0 auto;
    font-weight: 400;
}

/* Icon */
.page-hero__icon,
.service-hero__icon {
    margin-top: 30px;
    width: 70px;
    height: 70px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(38, 211, 0, 0.15), rgba(31, 163, 0, 0.15));
    border: 1px solid rgba(38, 211, 0, 0.3);
    font-size: 28px;
    color: #26d300;
    animation: heroIconPulse 3s ease-in-out infinite;
}

@keyframes heroIconPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(38, 211, 0, 0.3); }
    50% { box-shadow: 0 0 30px 10px rgba(38, 211, 0, 0.15); }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .page-hero__content,
    .service-hero__content {
        padding: 160px 0 80px;
    }
    
    .page-hero__breadcrumbs,
    .service-hero__breadcrumbs {
        padding: 8px 16px;
        font-size: 11px;
        gap: 8px;
    }
    
    .page-hero__title,
    .service-hero__title {
        margin: 24px 0 16px;
    }
    
    /* Reduce animations on mobile for performance */
    .global-tech-lines .tech-line:nth-child(n+4) {
        display: none;
    }
    
    .global-tech-particles .tech-particle:nth-child(n+5) {
        display: none;
    }
    
    .global-tech-grid {
        background-size: 40px 40px;
    }
}

/* ==========================================
   Accordion Fix - prevent text from hiding
   ========================================== */
.ori-mission-accordion .accordion-collapse {
    visibility: visible !important;
}

.ori-mission-accordion .accordion-collapse.collapse:not(.show) {
    display: none;
}

.ori-mission-accordion .accordion-collapse.collapsing {
    height: auto;
    transition: height 0.35s ease;
}

.ori-mission-accordion .accordion-body {
    visibility: visible !important;
    opacity: 1 !important;
}

/* ==========================================
   TECH PRELOADER - Futuristic Loading Screen
   ========================================== */

/* Override default preloader */
#preloader.tech-preloader {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 99999;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #050505;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Background with grid */
.tech-preloader-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.tech-preloader-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 50% 50%, rgba(38, 211, 0, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 20% 20%, rgba(38, 211, 0, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(38, 211, 0, 0.05) 0%, transparent 50%);
    animation: preloaderGlow 3s ease-in-out infinite alternate;
}

@keyframes preloaderGlow {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

.tech-preloader-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(38, 211, 0, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(38, 211, 0, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: gridPulse 2s ease-in-out infinite;
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Content container */
.tech-preloader-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Rotating rings */
.tech-preloader-rings {
    position: relative;
    width: 200px;
    height: 200px;
}

.tech-preloader-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
}

.tech-preloader-ring--1 {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-top-color: #26d300;
    border-right-color: #26d300;
    animation: ringRotate1 2s linear infinite;
    box-shadow: 
        0 0 20px rgba(38, 211, 0, 0.3),
        inset 0 0 20px rgba(38, 211, 0, 0.1);
}

.tech-preloader-ring--2 {
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border-bottom-color: #26d300;
    border-left-color: rgba(38, 211, 0, 0.5);
    animation: ringRotate2 1.5s linear infinite;
}

.tech-preloader-ring--3 {
    top: 30px;
    left: 30px;
    right: 30px;
    bottom: 30px;
    border-top-color: rgba(38, 211, 0, 0.7);
    border-right-color: rgba(38, 211, 0, 0.3);
    border-bottom-color: rgba(38, 211, 0, 0.7);
    animation: ringRotate1 3s linear infinite;
}

@keyframes ringRotate1 {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes ringRotate2 {
    0% { transform: rotate(360deg); }
    100% { transform: rotate(0deg); }
}

/* Center logo */
.tech-preloader-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 10, 0.8);
    border-radius: 50%;
    border: 1px solid rgba(38, 211, 0, 0.3);
    animation: centerPulse 2s ease-in-out infinite;
}

.tech-preloader-logo {
    max-width: 50px;
    max-height: 50px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(38, 211, 0, 0.5));
}

@keyframes centerPulse {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(38, 211, 0, 0.2);
        transform: translate(-50%, -50%) scale(1);
    }
    50% { 
        box-shadow: 0 0 40px rgba(38, 211, 0, 0.4);
        transform: translate(-50%, -50%) scale(1.05);
    }
}

/* Loading text */
.tech-preloader-text {
    margin-top: 40px;
    display: flex;
    align-items: center;
    gap: 2px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 4px;
    color: #26d300;
    text-shadow: 0 0 10px rgba(38, 211, 0, 0.5);
}

.tech-preloader-loading {
    animation: textFlicker 3s ease-in-out infinite;
}

@keyframes textFlicker {
    0%, 100% { opacity: 1; }
    92% { opacity: 1; }
    93% { opacity: 0.3; }
    94% { opacity: 1; }
    96% { opacity: 0.5; }
    97% { opacity: 1; }
}

.tech-preloader-dots span {
    animation: dotPulse 1.5s ease-in-out infinite;
    opacity: 0;
}

.tech-preloader-dots span:nth-child(1) { animation-delay: 0s; }
.tech-preloader-dots span:nth-child(2) { animation-delay: 0.3s; }
.tech-preloader-dots span:nth-child(3) { animation-delay: 0.6s; }

@keyframes dotPulse {
    0%, 60%, 100% { opacity: 0; }
    30% { opacity: 1; }
}

/* Progress bar */
.tech-preloader-progress {
    margin-top: 30px;
    width: 200px;
    height: 3px;
    background: rgba(38, 211, 0, 0.1);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.tech-preloader-progress::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid rgba(38, 211, 0, 0.2);
    border-radius: 2px;
}

.tech-preloader-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #26d300, #1fb300);
    box-shadow: 0 0 15px rgba(38, 211, 0, 0.5);
    animation: progressFill 2s ease-out forwards;
}

@keyframes progressFill {
    0% { width: 0%; }
    20% { width: 20%; }
    40% { width: 45%; }
    60% { width: 70%; }
    80% { width: 85%; }
    100% { width: 100%; }
}

/* Scan line effect */
.tech-preloader-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(38, 211, 0, 0.5), transparent);
    animation: scanLine 3s linear infinite;
}

@keyframes scanLine {
    0% { top: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* Corner brackets */
.tech-preloader-content::before,
.tech-preloader-content::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid #26d300;
    opacity: 0.5;
}

.tech-preloader-content::before {
    top: -60px;
    left: -60px;
    border-right: none;
    border-bottom: none;
}

.tech-preloader-content::after {
    bottom: -60px;
    right: -60px;
    border-left: none;
    border-top: none;
}

/* Fadeout animation class */
#preloader.tech-preloader.fade-out {
    animation: preloaderFadeOut 0.5s ease-out forwards;
}

@keyframes preloaderFadeOut {
    0% { 
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.02);
    }
    100% { 
        opacity: 0;
        transform: scale(1.05);
        visibility: hidden;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .tech-preloader-rings {
        width: 150px;
        height: 150px;
    }
    
    .tech-preloader-center {
        width: 60px;
        height: 60px;
    }
    
    .tech-preloader-logo {
        max-width: 35px;
        max-height: 35px;
    }
    
    .tech-preloader-text {
        font-size: 12px;
        letter-spacing: 3px;
    }
    
    .tech-preloader-progress {
        width: 150px;
    }
    
    .tech-preloader-content::before,
    .tech-preloader-content::after {
        width: 25px;
        height: 25px;
    }
    
    .tech-preloader-content::before {
        top: -40px;
        left: -40px;
    }
    
    .tech-preloader-content::after {
        bottom: -40px;
        right: -40px;
    }
}
