/* General Body and Typography */
body {
    font-family: 'Onest', sans-serif;
    background-color: #0f172a;
    color: #e2e8f0;
    overflow-x: hidden;
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

h1, h2, h3, h4, h5, h6, .font-title {
    font-family: 'Unbounded', sans-serif;
}

/* Gradient Backgrounds */
.gradient-bg {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}

.gradient-mesh-bg {
    background:
        radial-gradient(at 20% 30%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 80% 70%, rgba(168, 85, 247, 0.15) 0px, transparent 50%),
        radial-gradient(at 40% 80%, rgba(6, 182, 212, 0.1) 0px, transparent 50%),
        radial-gradient(at 90% 10%, rgba(236, 72, 153, 0.1) 0px, transparent 50%),
        #0f172a;
    background-size: 200% 200%, 200% 200%, 200% 200%, 200% 200%;
    animation: gradient-mesh 20s ease infinite;
}

/* Header and Navigation */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3B82F6, #06B6D4);
    transition: width 0.3s ease;
}

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

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 8px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 50;
    margin-top: 8px;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 10px 16px;
    color: rgb(226, 232, 240);
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.dropdown-item:hover {
    background: rgba(59, 130, 246, 0.15);
    color: white;
    transform: translateX(4px);
}

/* Logo Hover Effect */
.logo-hover {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.logo-hover:hover {
    opacity: 0.85;
    transform: scale(1.02);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    font-size: 1.5rem;
    color: white;
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
    background: rgba(59, 130, 246, 0.1);
}

.mobile-menu-btn:focus {
    outline: 2px solid rgba(59, 130, 246, 0.5);
    outline-offset: 2px;
}

/* Industries Accordion - Mobile */
.industries-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.industries-accordion-header:hover {
    color: white;
}

.industries-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 1rem;
}

.industries-accordion-content.active {
    max-height: 500px;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.industries-accordion-content a {
    display: block;
    padding: 0.75rem 0;
    color: rgb(203, 213, 225);
    transition: all 0.2s ease;
}

.industries-accordion-content a:hover {
    color: white;
    padding-left: 0.5rem;
}

.industries-accordion-content a.active {
    color: rgb(56, 189, 248);
    font-weight: 500;
}

/* Footer */
.footer-gradient-bg {
    background: linear-gradient(180deg,
        rgba(15, 23, 42, 0.95) 0%,
        rgba(30, 41, 59, 0.98) 50%,
        rgba(15, 23, 42, 1) 100%);
    background-size: 100% 200%;
    animation: footer-gradient 15s ease infinite;
}

.footer-link {
    color: rgb(148, 163, 184);
    transition: all 0.2s ease;
    position: relative;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(to right, #3B82F6, #A855F7);
    transition: width 0.3s ease;
}

.footer-link:hover {
    color: white;
}

.footer-link:hover::after {
    width: 100%;
}

/* Article Content */
.article-content h3, .article-content h4 {
    scroll-margin-top: 100px;
}

.article-content ul, .article-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.article-content ul {
    list-style-type: disc;
}

.article-content ol {
    list-style-type: decimal;
}

.article-content li {
    margin-bottom: 0.5rem;
    line-height: 1.75;
}

.article-content table {
    border-collapse: collapse;
    margin: 2rem 0;
}

.article-content table td {
    padding: 1rem;
    border-bottom: 1px solid #334155;
}

/* Animations and Effects */
@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes gradient-mesh {
    0%, 100% {
        background-position: 0% 50%, 100% 50%, 50% 0%, 50% 100%;
    }
    25% {
        background-position: 100% 50%, 0% 50%, 50% 100%, 50% 0%;
    }
    50% {
        background-position: 100% 100%, 0% 0%, 0% 100%, 100% 0%;
    }
    75% {
        background-position: 0% 100%, 100% 0%, 100% 100%, 0% 0%;
    }
}

@keyframes footer-gradient {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 0% 100%; }
}

.gradient-animate {
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

.button-shimmer {
    background-size: 200% auto;
    position: relative;
    overflow: hidden;
}

.button-shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s;
}

.button-shimmer:hover::before {
    left: 100%;
}

/* Back Link */
.back-link:hover {
    transform: translateX(-5px);
}

/* Scroll-triggered animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Stagger delays for cascading animations */
.stagger-1 { transition-delay: 0.15s; }
.stagger-2 { transition-delay: 0.3s; }
.stagger-3 { transition-delay: 0.45s; }
.stagger-4 { transition-delay: 0.6s; }

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    .fade-in, .scale-in {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Hero SVG Animations */
@keyframes flowingArrow {
    0% {
        stroke-dashoffset: 0;
    }
    100% {
        stroke-dashoffset: -60;
    }
}

.flowing-arrow {
    stroke-dasharray: 20 10;
    animation: flowingArrow 2s linear infinite;
}

@keyframes pulseSVG {
    0%, 100% {
        opacity: 0.9;
        filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.3));
    }
    50% {
        opacity: 1;
        filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.6));
    }
}

.pulse-box {
    animation: pulseSVG 3s ease-in-out infinite;
}

.svg-glow {
    filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.5));
}

.hero-svg-container {
    transition: transform 0.4s ease;
}

.hero-svg-container:hover {
    transform: perspective(1200px) rotateX(2deg) rotateY(-3deg) scale(1.02);
}
