/**
 * BLAVI LLC - Custom Styles
 * Modern Software Solutions Company
 */

/* ================================
   Custom Animations
   ================================ */

/* Scroll Down Animation */
@keyframes scrollDown {
    0% {
        opacity: 0;
        transform: translateY(0);
    }
    40% {
        opacity: 1;
    }
    80% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 0;
    }
}

.animate-scroll-down {
    animation: scrollDown 2s infinite;
}

/* 3D Hero Animation */
.hero-3d {
    perspective: 1000px;
}

.hero-3d > div {
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}

.hero-3d:hover > div {
    transform: rotateY(-5deg) rotateX(5deg);
}

/* Gradient Text Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

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

/* Glow Effect */
.glow {
    position: relative;
}

.glow::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, #facc15, #f59e0b, #facc15);
    border-radius: inherit;
    opacity: 0;
    z-index: -1;
    filter: blur(20px);
    transition: opacity 0.3s ease;
}

.glow:hover::before {
    opacity: 0.5;
}

/* Card Hover Effect */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(234, 179, 8, 0.25);
}

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

.shimmer {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* ================================
   Scrollbar Styling
   ================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #000000;
}

::-webkit-scrollbar-thumb {
    background: rgba(234, 179, 8, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(234, 179, 8, 0.5);
}

/* ================================
   Selection Styling
   ================================ */

::selection {
    background: rgba(234, 179, 8, 0.3);
    color: #fff;
}

::-moz-selection {
    background: rgba(234, 179, 8, 0.3);
    color: #fff;
}

/* ================================
   Loading Animation
   ================================ */

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ================================
   Reveal on Scroll Animations
   ================================ */

[data-aos] {
    opacity: 0;
    transition: all 0.6s ease;
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translateY(30px);
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}

[data-aos="fade-down"] {
    transform: translateY(-30px);
}

[data-aos="fade-down"].aos-animate {
    transform: translateY(0);
}

[data-aos="fade-left"] {
    transform: translateX(30px);
}

[data-aos="fade-left"].aos-animate {
    transform: translateX(0);
}

[data-aos="fade-right"] {
    transform: translateX(-30px);
}

[data-aos="fade-right"].aos-animate {
    transform: translateX(0);
}

[data-aos="zoom-in"] {
    transform: scale(0.9);
}

[data-aos="zoom-in"].aos-animate {
    transform: scale(1);
}

/* ================================
   Particle Background (optional)
   ================================ */

.particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(234, 179, 8, 0.5);
    border-radius: 50%;
    animation: particleFloat 10s infinite;
}

@keyframes particleFloat {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

/* ================================
   Glass Effect
   ================================ */

.glass {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ================================
   Gradient Border
   ================================ */

.gradient-border {
    position: relative;
    background: #0f172a;
    border-radius: 1rem;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    border-radius: inherit;
    background: linear-gradient(135deg, #facc15, #f59e0b, #facc15);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

/* ================================
   Text Utilities
   ================================ */

.text-balance {
    text-wrap: balance;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ================================
   Blog Content Styles
   ================================ */

.blog-content {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.9;
    font-size: 1.0625rem;
}

.blog-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-top: 4rem;
    margin-bottom: 2rem;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.blog-content h2:first-child {
    margin-top: 0;
}

.blog-content h3 {
    font-size: 2rem;
    font-weight: 600;
    color: #fff;
    margin-top: 3.5rem;
    margin-bottom: 1.75rem;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.blog-content h4 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.35;
}

.blog-content p {
    margin-bottom: 2rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.0625rem;
}

.blog-content ul,
.blog-content ol {
    margin-bottom: 2.25rem;
    margin-top: 1.75rem;
    padding-left: 2.5rem;
    line-height: 1.9;
}

.blog-content li {
    margin-bottom: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.0625rem;
}

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

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

.blog-content a {
    color: #facc15;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
    font-weight: 500;
}

.blog-content a:hover {
    color: #f59e0b;
}

.blog-content strong {
    font-weight: 600;
    color: #fff;
}

.blog-content em {
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
}

.blog-content blockquote {
    border-left: 4px solid #facc15;
    margin: 3rem 0;
    font-style: italic;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.03);
    padding: 1.75rem 2rem;
    border-radius: 0 0.75rem 0.75rem 0;
    font-size: 1.0625rem;
    line-height: 1.85;
}

.blog-content code {
    background: rgba(255, 255, 255, 0.12);
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
    color: #facc15;
}

.blog-content pre {
    background: rgba(0, 0, 0, 0.4);
    padding: 1.75rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-content pre code {
    background: transparent;
    padding: 0;
    color: rgba(255, 255, 255, 0.9);
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 3rem 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.blog-content hr {
    border: none;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    margin: 4rem 0;
}

/* ================================
   Responsive Adjustments
   ================================ */

@media (max-width: 768px) {
    .hero-3d > div {
        transform: none !important;
    }
    
    .hero-3d:hover > div {
        transform: none !important;
    }
    
    .blog-content {
        font-size: 1rem;
    }
    
    .blog-content h2 {
        font-size: 1.875rem;
        margin-top: 3rem;
        margin-bottom: 1.5rem;
    }
    
    .blog-content h3 {
        font-size: 1.5rem;
        margin-top: 2.5rem;
        margin-bottom: 1.25rem;
    }
    
    .blog-content h4 {
        font-size: 1.25rem;
        margin-top: 2rem;
        margin-bottom: 1rem;
    }
    
    .blog-content p {
        margin-bottom: 1.5rem;
        font-size: 1rem;
    }
}

/* ================================
   Print Styles
   ================================ */

@media print {
    nav,
    footer,
    #scroll-to-top,
    .no-print {
        display: none !important;
    }
    
    body {
        background: #fff !important;
        color: #000 !important;
    }
}

/* ================================
   Body Background - Extra Dark
   ================================ */

html, body {
    background-color: #000000 !important;
}

#main-content {
    background-color: #000000;
}

/* Dark section backgrounds */
.bg-dark-950 {
    background-color: #000000;
}

/* Card backgrounds with dark gray colors (instead of blue-tinted dark-900) */
.card-bg-dark-50 {
    background-color: rgba(10, 10, 10, 0.5) !important;
}

.card-bg-dark-50:hover {
    background-color: rgba(10, 10, 10, 0.7) !important;
}

.card-bg-dark-60 {
    background-color: rgba(10, 10, 10, 0.6) !important;
}

.card-bg-dark-60:hover {
    background-color: rgba(10, 10, 10, 0.8) !important;
}

.card-bg-dark-70 {
    background-color: rgba(10, 10, 10, 0.7) !important;
}

/* Mobile Menu Active State */
#mobile-menu.active {
    transform: translateX(0) !important;
}
