/* =============================================
   DigiSolusi - Company Profile CSS
   Premium Dark Theme with Glassmorphism
   ============================================= */

/* CSS Variables */
:root {
    --primary: #0284c7;
    --secondary: #0369a1;
    --accent: #06b6d4;
    --dark: #0c4a6e;
    --darker: #082f49;
    --light: #f0f9ff;
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(14, 165, 233, 0.2);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--dark);
    font-family: 'Inter', sans-serif;
    color: #f8fafc;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--darker);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--secondary), var(--primary));
}

/* Glassmorphism Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}

/* Navigation */
#navbar {
    background: transparent;
    transition: all 0.3s ease;
}

#navbar.scrolled {
    background: rgba(2, 132, 199, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Ensure nav links stay white in scrolled state */
#navbar.scrolled .nav-link,
#navbar .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

#navbar.scrolled .nav-link:hover,
#navbar .nav-link:hover,
#navbar .nav-link.active {
    color: #ffffff !important;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #ffffff, var(--accent));
    transition: width 0.3s ease;
}

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

/* Hero Section */
.hero-pattern {
    background-image:
        radial-gradient(circle at 25% 25%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 50px 50px, 50px 50px;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Service Cards */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.service-card:hover::before {
    opacity: 1;
}

/* Portfolio Item */
.portfolio-item {
    cursor: pointer;
}

.portfolio-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--dark) 0%, transparent 100%);
    z-index: 1;
}

/* Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(99, 102, 241, 0.5);
    }
}

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

/* Form Styles */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary::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 ease;
}

.btn-primary:hover::before {
    left: 100%;
}

/* Back to Top Button */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* Selection */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: #fff;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-pattern {
        background-size: 100% 100%, 100% 100%, 30px 30px, 30px 30px;
    }
}

/* Loading Animation */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Counter Animation */
.counter {
    display: inline-block;
}

/* Smooth Transitions for All Interactive Elements */
a,
button,
input,
textarea {
    transition: all 0.3s ease;
}

/* Image Placeholder Gradients */
.img-placeholder {
    background: linear-gradient(135deg,
            rgba(99, 102, 241, 0.2) 0%,
            rgba(139, 92, 246, 0.2) 50%,
            rgba(34, 211, 238, 0.2) 100%);
}

/* Text Shadows for Headings */
h1,
h2,
h3 {
    text-shadow: 0 0 40px rgba(99, 102, 241, 0.1);
}

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

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15);
}

/* Gradient Borders */
.gradient-border {
    position: relative;
    background: var(--dark);
}

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

/* Smooth Reveal for AOS */
[data-aos] {
    pointer-events: none;
}

[data-aos].aos-animate {
    pointer-events: auto;
}

/* Mobile Menu Animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#mobile-menu.show {
    max-height: 500px;
}

/* Focus States for Accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    body {
        background: #fff;
        color: #000;
    }

    .glass-card {
        background: #f5f5f5;
        border: 1px solid #ddd;
    }
}
