/* Initial styles */

/* AV Pages Styles */
:root {
    --primary-blue: #00BFFF;
    --secondary-blue: #1E90FF;
    --accent-blue: #87CEEB;
    --dark-bg: #0a0a0a;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #e2e8f0; /* Lighter gray for better contrast */
    --glow-color: rgba(0, 191, 255, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Video background */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    opacity: 0.4;
    pointer-events: none;
}

/* Fallback gradient if video doesn't load */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(0, 191, 255, 0.15) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

/* Custom cursor */
.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 191, 255, 0.15) 0%, rgba(0, 191, 255, 0.08) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    opacity: 0;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 191, 255, 0.2);
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-blue);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary-blue);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-blue);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Main content */
.main-content {
    margin-top: 80px;
    padding: 2rem;
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--primary-blue);
    text-shadow: 0 0 20px rgba(0, 191, 255, 0.5);
    animation: fadeInUp 1s ease-out;
}

.video-container {
    position: relative;
    width: 90%;
    max-width: 1000px;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(0, 191, 255, 0.2);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(0, 191, 255, 0.1);
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.video-container:hover {
    transform: translateY(-5px);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(0, 191, 255, 0.2);
}

.enhanced-video {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.enhanced-video:hover {
    transform: scale(1.02);
}

.video-info {
    margin-top: 1.5rem;
    text-align: center;
}

.video-title {
    font-size: 1.5rem;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.video-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Next video link styles for page2 */
.next-video-link {
    display: block;
    margin: 3rem auto 0;
    text-align: center;
    text-decoration: none;
    color: inherit;
}

.next-video-link img {
    width: 200px;
    height: 150px;
    object-fit: cover;
    border-radius: 15px;
    border: 2px solid rgba(0, 191, 255, 0.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.next-video-link img:hover {
    transform: scale(1.05);
    border-color: var(--primary-blue);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 191, 255, 0.2);
}

.next-video-preview {
    position: relative;
    display: inline-block;
}

.next-video-preview video {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid rgba(0, 191, 255, 0.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.next-video-preview:hover video {
    opacity: 1;
}

.next-video-preview:hover img {
    opacity: 0;
}

.next-video-text {
    margin-top: 1rem;
    color: var(--primary-blue);
    font-size: 1.1rem;
    font-weight: 500;
}

/* Footer */
.footer {
    background: rgba(10, 10, 10, 0.95);
    border-top: 1px solid rgba(0, 191, 255, 0.2);
    padding: 2rem 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 0 2rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-blue);
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 191, 255, 0.1); }
    50% { box-shadow: 0 0 30px rgba(0, 191, 255, 0.3); }
}

.video-container {
    animation: float 6s ease-in-out infinite;
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .main-content {
        padding: 1rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .video-container {
        width: 95%;
        padding: 1rem;
    }

    .cursor-glow {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Next video preview (for page2) */
.next-video-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.next-video-link {
    display: inline-block;
    text-decoration: none;
    color: inherit;
}

.next-video-preview {
    position: relative;
}

.next-video-preview img {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid rgba(0, 191, 255, 0.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.next-video-preview video {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid rgba(0, 191, 255, 0.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.next-video-preview:hover video {
    opacity: 1;
}

.next-video-preview:hover img {
    opacity: 0;
}

.next-video-text {
    margin-top: 0.5rem;
    color: var(--primary-blue);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

/* Nav video thumbnail */
.nav-video-thumb {
    width: 40px;
    height: 30px;
    object-fit: cover;
    border-radius: 5px;
    vertical-align: middle;
    margin-right: 5px;
}

/* Styles from indexold.html */
.hero-section {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://glennguilloux.com/DSC06001.JPG');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    min-height: 100vh;
    background-attachment: fixed;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}
.hero-section > * {
    position: relative;
    z-index: 1;
}
.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: white;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}
.contact-form input,
.contact-form textarea {
    transition: all 0.3s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
    transform: scale(1.02);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Add smooth scrolling to all pages */
html {
    scroll-behavior: smooth;
}

/* Style for the active navigation link */
.nav-link.active {
    color: var(--color-primary);
    font-weight: 600;
    border-bottom: 2px solid var(--color-primary);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Dark/Light Theme Variables */
:root {
    --primary: #3b82f6;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #e2e8f0; /* Increased contrast from #cbd5e1 */
    --border-color: #334155;
    --card-bg: rgba(30, 41, 59, 0.5);
    
    /* Z-Index Scale (ui-skills compliance) */
    --z-skip: 100;
    --z-dropdown: 50;
    --z-sticky: 40;
    --z-nav: 30;
    --z-modal: 20;
    --z-popover: 10;
    --z-tooltip: 5;
    --z-base: 0;
    --z-background: -1;
    --z-below: -2;
}

:root[data-theme="light"] {
    --primary: #2563eb;
    --secondary: #7c3aed;
    --accent: #0891b2;
    --bg-primary: #f8fafc;
    --bg-secondary: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --border-color: #cbd5e1;
    --card-bg: rgba(255, 255, 255, 0.8);
}

/* Theme-specific styles */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Update existing Tailwind classes to use CSS variables */
.bg-gray-900 { background-color: var(--bg-primary) !important; }
.bg-gray-800 { background-color: var(--bg-secondary) !important; }
.bg-gray-800\/30 { background-color: color-mix(in srgb, var(--bg-secondary) 30%, transparent) !important; }
.bg-gray-800\/50 { background-color: color-mix(in srgb, var(--bg-secondary) 50%, transparent) !important; }
.text-white { color: var(--text-primary) !important; }
.text-gray-300 { color: var(--text-secondary) !important; }
.text-gray-400 { color: var(--text-secondary) !important; }
.border-gray-700 { border-color: var(--border-color) !important; }
.border-gray-800 { border-color: var(--border-color) !important; }

/* Theme toggle button styles */
.theme-toggle {
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

/* Light theme specific background adjustments */
:root[data-theme="light"] body::before {
    opacity: 0.05;
}

:root[data-theme="light"] body::after {
    background: radial-gradient(ellipse at center, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
}

/* Feature card hover effects */
.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 191, 255, 0.2);
}

/* Text contrast enhancements for accessibility */
.text-gray-300 {
    color: var(--text-secondary) !important;
}
.text-gray-400 {
    color: var(--text-secondary) !important;
}
.text-yellow-400 {
    color: #facc15 !important; /* Brighter yellow for better contrast */
}

/* Status indicator enhancements for better contrast */
.workflow-status-indicator {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}
.status-online {
    background-color: rgba(22, 163, 74, 0.2) !important; /* emerald-500/20 */
    color: #34d399 !important; /* emerald-400 */
}
.status-offline {
    background-color: rgba(239, 68, 68, 0.2) !important; /* red-500/20 */
    color: #f87171 !important; /* red-400 */
}
.status-warning {
    background-color: rgba(245, 158, 11, 0.2) !important; /* amber-500/20 */
    color: #fde047 !important; /* amber-300 */
}

/* Text shadow utilities */
.text-shadow-sm {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.text-shadow-md {
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

.text-shadow-lg {
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.9);
}

.text-shadow-glow {
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.7), 0 0 20px rgba(0, 191, 255, 0.5);
}

/* Apply to specific elements */
h1, h2, h3, h4, h5, h6 {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.nav-link {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* For the AI Workflows section heading */
#ai-workflows h2 {
    text-shadow: 0 2px 8px rgba(0, 191, 255, 0.5);
}

/* Modal styles */
.platform-modal {
    background: rgba(15, 23, 42, 0.95); /* Match site's dark theme */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   SUBTLE ANIMATIONS (UI Skills Compliant)
   ============================================ */

/* Entrance Animations - Fade in + Slide up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Staggered animation delays */
.animation-stagger-1 { animation-delay: 0ms; }
.animation-stagger-2 { animation-delay: 100ms; }
.animation-stagger-3 { animation-delay: 200ms; }
.animation-stagger-4 { animation-delay: 300ms; }
.animation-stagger-5 { animation-delay: 400ms; }
.animation-stagger-6 { animation-delay: 500ms; }

/* Initial hidden state for scroll animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Card hover effects - lift and subtle scale */
.card-hover-lift {
    transition: transform 0.25s ease-out, box-shadow 0.25s ease-out, border-color 0.25s ease-out;
}

.card-hover-lift:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

/* Service card specific hover */
.service-card {
    transition: transform 0.25s ease-out, border-color 0.25s ease-out, box-shadow 0.25s ease-out;
}

.service-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.15);
}

/* Icon hover scale */
.icon-hover-scale {
    transition: transform 0.25s ease-out;
}

.icon-hover-scale:hover {
    transform: scale(1.1);
}

/* Button animations */
.btn-hover-lift {
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.btn-hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.btn-hover-lift:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Focus visible for keyboard navigation */
.focus-ring {
    transition: outline 0.2s ease-out, box-shadow 0.2s ease-out;
}

.focus-ring:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

/* Nav link underline animation */
.nav-link-underline {
    position: relative;
}

.nav-link-underline::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.25s ease-out;
}

.nav-link-underline:hover::after,
.nav-link-underline.active::after {
    width: 100%;
}

/* Social icon hover */
.social-icon {
    transition: transform 0.2s ease-out, background-color 0.2s ease-out;
}

.social-icon:hover {
    transform: translateY(-2px);
}

/* Back to top button */
.back-to-top {
    transition: opacity 0.3s ease-out, transform 0.3s ease-out, background-color 0.2s ease-out;
}

.back-to-top:hover {
    transform: translateY(-2px);
}

/* Metric counter animation */
.metric-value {
    transition: transform 0.3s ease-out, color 0.3s ease-out;
}

.metric-value:hover {
    transform: scale(1.05);
    color: var(--primary);
}

/* Section divider line animation */
.divider-line {
    transition: width 0.6s ease-out;
}

.section-divider:hover .divider-line {
    width: 120px;
}

/* Loading skeleton shimmer */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton-shimmer {
    background: linear-gradient(90deg, 
        rgba(255,255,255,0.05) 25%, 
        rgba(255,255,255,0.1) 50%, 
        rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Pulse animation for important elements */
@keyframes subtlePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.pulse-subtle {
    animation: subtlePulse 2s ease-in-out infinite;
}

/* Text reveal animation for headings */
@keyframes textReveal {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.text-reveal {
    display: inline-block;
    opacity: 0;
    animation: textReveal 0.5s ease-out forwards;
}

/* Gradient text animation */
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.gradient-animate {
    background-size: 200% auto;
    animation: gradientShift 3s ease infinite;
}

/* ============================================
   IMMEDIATE VISIBLE ANIMATIONS
   These trigger on page load without scroll
   ============================================ */

/* Hero section immediate animation */
.hero-animate {
    animation: fadeInUp 1s ease-out;
}

.hero-title-animate {
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.hero-subtitle-animate {
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.hero-cta-animate {
    animation: fadeInUp 0.8s ease-out 0.6s backwards;
}

.hero-image-animate {
    animation: fadeIn 1s ease-out 0.5s backwards;
}

/* Pulsing glow for logo */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    50% {
        box-shadow: 0 0 20px 5px rgba(59, 130, 246, 0.6);
    }
}

.logo-pulse {
    animation: pulseGlow 2s ease-in-out infinite;
}

/* Floating animation for hero image */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.hero-float {
    animation: float 3s ease-in-out infinite;
}
