/* Bio Tech Global Redesign Custom Stylesheet */

/* Premium Custom Dropdowns with Smooth Transition */
.dropdown-menu {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: block !important; /* Always display but hide using opacity/transform */
}
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -16px; /* Bridges the mt-3 gap (12px) with overlap */
    left: 0;
    right: 0;
    height: 16px;
    background: transparent;
}
.dropdown-menu.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Startup Preloader Animations */
@keyframes preloader-pulse {
    0%, 100% {
        transform: scale(0.95);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.08);
        opacity: 0.9;
    }
}

@keyframes draw-path {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-preloader-pulse {
    animation: preloader-pulse 2.5s infinite ease-in-out;
}

.animate-fade-in-up {
    animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.globe-path {
    stroke-dasharray: 120;
    stroke-dashoffset: 120;
    animation: draw-path 2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Page Loaded Hero Animations */
.hero-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

body.page-loaded .hero-animate {
    opacity: 1;
    transform: translateY(0);
}

.hero-container-animate {
    opacity: 0;
    transform: translateY(-250px);
    transition: opacity 1.5s cubic-bezier(0.16, 1, 0.3, 1), transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

body.page-loaded .hero-container-animate {
    opacity: 1;
    transform: translateY(0);
}


/* Floating Ambient Aura Slow Animation */
@keyframes pulse-slow {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.12);
    }
}
.animate-pulse-slow {
    animation: pulse-slow 8s infinite ease-in-out;
}

/* Scroll Reveal Utilities */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Heading Underline Effect */
.hover-underline-effect {
    position: relative;
}
.hover-underline-effect::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-brand-600, #16a34a);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.hover-underline-effect:hover::after {
    width: 100%;
}

/* Floating Navbar dynamic scrolled behavior */
header.floating-nav {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background-color: rgba(255, 255, 255, 0.15) !important; /* Brighter white glassmorphism base */
    border-color: rgba(255, 255, 255, 0.25) !important; /* Brighter highlight border edge */
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15) !important;
}

header.floating-nav nav a,
header.floating-nav nav button,
header.floating-nav #lang-btn,
header.floating-nav #mobile-menu-btn {
    color: rgba(255, 255, 255, 0.85) !important;
}

header.floating-nav nav a:hover,
header.floating-nav nav button:hover,
header.floating-nav #lang-btn:hover,
header.floating-nav #mobile-menu-btn:hover {
    color: #ffffff !important;
}

header.floating-nav .hover-underline-effect::after {
    background-color: #bce968 !important; /* Glowing brand-300 underline over dark background */
}

/* Dark mode dropdown menu styling */
header.floating-nav .dropdown-menu {
    background-color: rgba(18, 27, 0, 0.95) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
}

header.floating-nav .dropdown-menu a {
    color: rgba(255, 255, 255, 0.8) !important;
}

header.floating-nav .dropdown-menu a:hover {
    background-color: rgba(132, 193, 0, 0.2) !important;
    color: #bce968 !important;
}

/* Dark mode mobile drawer styling */
header.floating-nav #mobile-drawer {
    background-color: rgba(18, 27, 0, 0.98) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

header.floating-nav #mobile-drawer a,
header.floating-nav #mobile-drawer button {
    color: rgba(255, 255, 255, 0.85) !important;
}

header.floating-nav #mobile-drawer a.bg-brand-50\/50 {
    background-color: rgba(132, 193, 0, 0.15) !important;
    color: #bce968 !important;
}

header.floating-nav #mobile-drawer .mobile-dropdown-menu {
    background-color: rgba(0, 0, 0, 0.3) !important;
}

header.floating-nav.scrolled {
    top: 0.5rem; /* top-2 */
    left: 0.5rem;
    right: 0.5rem;
    background-color: rgba(255, 255, 255, 0.85) !important; /* Light glass */
    border-color: rgba(132, 193, 0, 0.18) !important; /* Light lime outline */
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.12), 0 1px 3px 0 rgba(0, 0, 0, 0.05) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
}

header.floating-nav.scrolled nav a,
header.floating-nav.scrolled nav button,
header.floating-nav.scrolled #lang-btn,
header.floating-nav.scrolled #mobile-menu-btn {
    color: #374151 !important; /* gray-700 */
}

header.floating-nav.scrolled nav a:hover,
header.floating-nav.scrolled nav button:hover,
header.floating-nav.scrolled #lang-btn:hover,
header.floating-nav.scrolled #mobile-menu-btn:hover {
    color: #557d00 !important; /* brand-600 */
}

header.floating-nav.scrolled .hover-underline-effect::after {
    background-color: #557d00 !important; /* Brand-600 underline over light background */
}

/* Light mode dropdown menu styling */
header.floating-nav.scrolled .dropdown-menu {
    background-color: rgba(255, 255, 255, 0.96) !important;
    border-color: rgba(132, 193, 0, 0.15) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
}

header.floating-nav.scrolled .dropdown-menu a {
    color: #4b5563 !important; /* gray-600 */
}

header.floating-nav.scrolled .dropdown-menu a:hover {
    background-color: rgba(132, 193, 0, 0.1) !important;
    color: #496b00 !important; /* brand-700 */
}

/* Light mode mobile drawer styling */
header.floating-nav.scrolled #mobile-drawer {
    background-color: rgba(255, 255, 255, 0.98) !important;
    border-top: 1px solid rgba(132, 193, 0, 0.15) !important;
}

header.floating-nav.scrolled #mobile-drawer a,
header.floating-nav.scrolled #mobile-drawer button {
    color: #4b5563 !important;
}

header.floating-nav.scrolled #mobile-drawer a.bg-brand-50\/50 {
    background-color: rgba(132, 193, 0, 0.1) !important;
    color: #496b00 !important;
}

header.floating-nav.scrolled #mobile-drawer .mobile-dropdown-menu {
    background-color: rgba(243, 244, 246, 0.5) !important;
}

@media (min-width: 768px) {
    header.floating-nav.scrolled {
        top: 0.75rem; /* top-3 */
        left: 1.5rem;
        right: 1.5rem;
        height: 4.5rem; /* Shrinks height from 5rem to 4.5rem */
    }
}
@media (min-width: 1280px) {
    header.floating-nav.scrolled {
        left: 2rem;
        right: 2rem;
    }
}

/* Premium Slow & Smooth Card Hover Scaling */
.card-hover-effect {
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.7s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.7s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.card-hover-effect:hover {
    transform: translateY(-8px) scale(1.02) !important;
}

.card-image-zoom {
    transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.group:hover .card-image-zoom {
    transform: scale(1.05) !important;
}

/* Animation & Transition Delay Utilities (To Replace Inline Styles) */
.delay-100 { transition-delay: 100ms !important; animation-delay: 100ms !important; }
.delay-150 { transition-delay: 150ms !important; animation-delay: 150ms !important; }
.delay-200 { transition-delay: 200ms !important; animation-delay: 200ms !important; }
.delay-250 { transition-delay: 250ms !important; animation-delay: 250ms !important; }
.delay-300 { transition-delay: 300ms !important; animation-delay: 300ms !important; }
.delay-400 { transition-delay: 400ms !important; animation-delay: 400ms !important; }
.delay-550 { transition-delay: 550ms !important; animation-delay: 550ms !important; }
.delay-600 { transition-delay: 600ms !important; animation-delay: 600ms !important; }
.delay-700 { transition-delay: 700ms !important; animation-delay: 700ms !important; }
.delay-850 { transition-delay: 850ms !important; animation-delay: 850ms !important; }
.delay-2000 { animation-delay: 2s !important; }

/* Preloader progress bar style */
.preloader-bar {
    width: 0;
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Deep Dark Hero Video Overlay & Video Styling */
.overlay-deep-dark {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.35) 0%,
        rgba(18, 27, 0, 0.15) 50%,
        rgba(0, 0, 0, 0.25) 100%
    );
    pointer-events: none;
    z-index: 5;
}

.home-hero-overlay {
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(18, 27, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.5) 100%
    );
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.65;
}

/* Global Typography & Layout Consistency Resets */
html {
    scroll-behavior: smooth;
}

body {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Enforce Outfit font on all headings for site-wide consistency */
h1, h2, h3, h4, h5, h6, .font-heading {
    font-family: 'Outfit', 'Inter', 'sans-serif' !important;
}

/* Light navigation styling override for pages starting with a light header background */
body.light-nav-page header.floating-nav:not(.scrolled) {
    background-color: rgba(255, 255, 255, 0.8) !important;
    border-color: rgba(132, 193, 0, 0.15) !important;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.12), 0 1px 3px 0 rgba(0, 0, 0, 0.05) !important;
}

body.light-nav-page header.floating-nav:not(.scrolled) nav a,
body.light-nav-page header.floating-nav:not(.scrolled) nav button,
body.light-nav-page header.floating-nav:not(.scrolled) #lang-btn,
body.light-nav-page header.floating-nav:not(.scrolled) #mobile-menu-btn {
    color: #374151 !important; /* gray-700 */
}

body.light-nav-page header.floating-nav:not(.scrolled) nav a:hover,
body.light-nav-page header.floating-nav:not(.scrolled) nav button:hover,
body.light-nav-page header.floating-nav:not(.scrolled) #lang-btn:hover,
body.light-nav-page header.floating-nav:not(.scrolled) #mobile-menu-btn:hover {
    color: #557d00 !important; /* brand-600 */
}

body.light-nav-page header.floating-nav:not(.scrolled) .hover-underline-effect::after {
    background-color: #557d00 !important;
}

/* For dropdown menus in light nav mode before scrolling */
body.light-nav-page header.floating-nav:not(.scrolled) .dropdown-menu {
    background-color: rgba(255, 255, 255, 0.96) !important;
    border-color: rgba(132, 193, 0, 0.15) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
}

body.light-nav-page header.floating-nav:not(.scrolled) .dropdown-menu a {
    color: #4b5563 !important; /* gray-600 */
}

body.light-nav-page header.floating-nav:not(.scrolled) .dropdown-menu a:hover {
    background-color: rgba(132, 193, 0, 0.1) !important;
    color: #496b00 !important; /* brand-700 */
}

/* Light mode mobile drawer styling before scrolling */
body.light-nav-page header.floating-nav:not(.scrolled) #mobile-drawer {
    background-color: rgba(255, 255, 255, 0.98) !important;
    border-top: 1px solid rgba(132, 193, 0, 0.15) !important;
}

body.light-nav-page header.floating-nav:not(.scrolled) #mobile-drawer a,
body.light-nav-page header.floating-nav:not(.scrolled) #mobile-drawer button {
    color: #4b5563 !important;
}

body.light-nav-page header.floating-nav:not(.scrolled) #mobile-drawer a.bg-brand-50\/50 {
    background-color: rgba(132, 193, 0, 0.1) !important;
    color: #496b00 !important;
}

body.light-nav-page header.floating-nav:not(.scrolled) #mobile-drawer .mobile-dropdown-menu {
    background-color: rgba(243, 244, 246, 0.5) !important;
}

/* Desktop Interactive Flex Accordion Showcase styles */
.writing-mode-vertical {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}
@media (min-width: 1024px) {
    .accordion-container:hover .accordion-panel:not(:hover) {
        flex: 0.65 1 0%;
        opacity: 0.55;
        filter: grayscale(35%) blur(0.4px);
    }
    .accordion-panel {
        flex: 1 1 0%;
        transition: flex 0.7s cubic-bezier(0.16, 1, 0.3, 1), 
                    opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                    filter 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                    border-color 0.6s ease, 
                    box-shadow 0.6s ease;
    }
    .accordion-panel:hover {
        flex: 4 1 0%;
        opacity: 1;
        filter: none;
    }
}
