/* Custom styles for Home page */
:root {
    --card-radius: 0.5rem;
    --accent-primary: #3b82f6;
    --accent-secondary: #2563eb;
    --standard-transition: all 0.3s ease;
    --dark-blue: #0f172a;
    --darker-blue: #0a1120;
    --medium-blue: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --border-color: #334155;
}

/* Performance optimized animations */
:root {
    --card-radius: 0.5rem;
    --accent-primary: #3b82f6;
    --accent-secondary: #2563eb;
    --standard-transition: transform 0.3s ease, opacity 0.3s ease;
    --dark-blue: #0f172a;
    --darker-blue: #0a1120;
    --medium-blue: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --border-color: #334155;
}

/* Use hardware acceleration for animations */
.animate__animated {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
    will-change: transform, opacity;
}

/* Optimize hero container */
.hero-container {
    border-radius: var(--card-radius);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(0, 0, 0, 0.2) 100%);
    position: relative;
    overflow: hidden;
    min-height: 520px;
    margin-top: -1rem;
    border: 1px solid rgba(59, 130, 246, 0.15);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateZ(0);
}

/* Optimize background patterns */
.hero-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.05) 1%, transparent 5%),
        radial-gradient(circle at 75% 75%, rgba(59, 130, 246, 0.05) 1%, transparent 5%);
    background-size: 60px 60px;
    opacity: 0.2;
    z-index: 0;
    pointer-events: none;
}

/* Optimize particle animations */
.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    background: rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    pointer-events: none;
    transform: translateZ(0);
    will-change: transform;
}

/* Optimize floating animations */
@keyframes float1 {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(0); }
    50% { transform: translate3d(0, -15px, 0) rotate(5deg); }
}

@keyframes float2 {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(0); }
    50% { transform: translate3d(0, 15px, 0) rotate(-5deg); }
}

@keyframes float3 {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(0); }
    50% { transform: translate3d(0, -20px, 0) rotate(10deg); }
}

/* Optimize card hover effects */
.card-hover {
    transition: var(--standard-transition);
    background-color: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
    border-color: rgba(51, 65, 85, 0.5);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    transform: translateZ(0);
}

.card-hover:hover {
    transform: translate3d(0, -5px, 0);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-primary);
    background-color: rgba(15, 23, 42, 0.85);
}

/* Optimize counter animations */
.hero-stat-value .counter {
    background: linear-gradient(to right, #3b82f6, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    will-change: transform, opacity;
}

@keyframes pulse-blue {
    0%, 100% { text-shadow: 0 0 5px rgba(59, 130, 246, 0.5); }
    50% { text-shadow: 0 0 15px rgba(59, 130, 246, 0.8); }
}

/* Optimize mobile performance */
@media (max-width: 768px) {
    .hero-container {
        min-height: auto;
        margin-top: 0;
        transform: none;
    }

    .hero-particles {
        opacity: 0.5;
    }

    .particle {
        animation-duration: 2s !important;
    }

    .hero-stat-value {
        font-size: 1.5rem !important;
    }

    .animate__animated {
        animation-duration: 0.5s !important;
    }

    .card-hover {
        backdrop-filter: none;
        background-color: rgba(15, 23, 42, 0.9);
    }
}

/* Optimize animations for reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .animate__animated {
        animation: none !important;
        transition: none !important;
    }

    .hero-particles {
        display: none;
    }

    .card-hover {
        transition: none;
    }

    .floating-icon {
        animation: none !important;
    }
}

/* Dark mode styles applied by default */
.hero-content {
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.text-gradient {
    background-image: linear-gradient(135deg, #f8fafc 0%, #64a5ff 70%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 5px 25px rgba(100, 165, 255, 0.2);
}

.display-3 {
    font-size: 3.5rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-shadow: 0 5px 25px rgba(59, 130, 246, 0.3);
}

.display-4 {
    letter-spacing: -0.01em;
}

.hero-stats {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.hero-stat {
    padding-right: 1.5rem;
    position: relative;
    text-align: center;
    margin-right: 0.5rem;
}

.hero-stat:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    height: 70%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--accent-primary, #3b82f6), transparent);
    opacity: 0.3;
}

.hero-stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--accent-primary, #3b82f6);
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
    position: relative;
    display: inline-block;
    margin-bottom: 0.25rem;
}

.hero-stat-value .counter {
    position: relative;
    display: inline-block;
    background: linear-gradient(to right, #3b82f6, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulse-blue 2s infinite;
}

.hero-stat-value::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, #3b82f6, transparent);
    opacity: 0.7;
}

@keyframes pulse-blue {
    0% {
        text-shadow: 0 0 5px rgba(59, 130, 246, 0.5);
    }
    50% {
        text-shadow: 0 0 15px rgba(59, 130, 246, 0.8);
    }
    100% {
        text-shadow: 0 0 5px rgba(59, 130, 246, 0.5);
    }
}

.hero-stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary, #64748b);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
}

.hero-image-container {
    position: relative;
    height: 100%;
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-illustration {
    position: relative;
    width: 100%;
    height: 100%;
}

.illustration-element {
    position: absolute;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.15);
}

.box1 {
    width: 100px;
    height: 100px;
    top: 50%;
    left: 40%;
    transform: translate(-50%, -50%) rotate(15deg);
    animation: float1 6s ease-in-out infinite;
}

.box2 {
    width: 70px;
    height: 70px;
    top: 35%;
    left: 55%;
    transform: translate(-50%, -50%) rotate(-10deg);
    animation: float2 7s ease-in-out infinite;
}

.box3 {
    width: 50px;
    height: 50px;
    top: 65%;
    left: 55%;
    transform: translate(-50%, -50%) rotate(20deg);
    animation: float3 5s ease-in-out infinite;
}

.box4 {
    width: 40px;
    height: 40px;
    top: 45%;
    left: 65%;
    transform: translate(-50%, -50%) rotate(-15deg);
    animation: float1 8s ease-in-out infinite;
}

.main-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    filter: drop-shadow(0 5px 15px rgba(59, 130, 246, 0.3));
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
}

.floating-icon {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 3;
}

.icon1 {
    top: 30%;
    left: 35%;
    animation: float1 6s ease-in-out infinite;
}

.icon2 {
    top: 65%;
    left: 35%;
    animation: float2 7s ease-in-out infinite;
}

.icon3 {
    top: 40%;
    left: 65%;
    animation: float3 5s ease-in-out infinite;
}

.icon4 {
    top: 70%;
    left: 60%;
    animation: float1 8s ease-in-out infinite;
}

.floating-icon i {
    color: var(--accent-primary);
}

/* Icon hover effects */
.scale-on-hover {
    transition: transform 0.3s ease;
}

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

/* Icon circle styling */
.icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

/* Custom icon backgrounds with better visibility */
.icon-bg-warning {
    background-color: rgba(255, 193, 7, 0.2);
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.1);
}

/* Section title style */
.section-title {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    border-bottom: none;
}

.section-title::after {
    display: none;
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--accent-primary) 0%, transparent 100%);
    margin-left: 15px;
    opacity: 0.5;
    border: none;
}

/* Dark System Overview Stats */
.bg-dark-blue {
    background-color: var(--dark-blue);
    border-radius: var(--card-radius);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-column {
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-column:last-child {
    border-right: none;
}

.stat-card-dark {
    height: 100%;
    position: relative;
    transition: all 0.3s ease;
    background-color: var(--dark-blue);
    color: white;
}

.stat-card-dark:hover {
    background-color: var(--medium-blue);
    transform: translateY(-3px);
}

.stat-icon-dark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
}

.stat-label-dark {
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.stat-value-dark {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1;
}

.stat-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
}

.stat-border-primary {
    background: linear-gradient(to right, rgba(59, 130, 246, 0.8), rgba(59, 130, 246, 0.1));
}

.stat-border-success {
    background: linear-gradient(to right, rgba(16, 185, 129, 0.8), rgba(16, 185, 129, 0.1));
}

.stat-border-info {
    background: linear-gradient(to right, rgba(14, 165, 233, 0.8), rgba(14, 165, 233, 0.1));
}

.stat-border-warning {
    background: linear-gradient(to right, rgba(245, 158, 11, 0.8), rgba(245, 158, 11, 0.1));
}

/* Step styling */
.step-number {
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-weight: bold;
    font-size: 1.1rem;
}

.hover-card {
    padding: 0.5rem;
    border-radius: 8px;
}

.hover-card:hover {
    background-color: rgba(59, 130, 246, 0.1);
    transform: translateX(5px);
}

.hover-card:hover .step-number {
    transform: scale(1.15);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.getting-started-steps a {
    position: relative;
    text-decoration: none;
    font-weight: 500;
    color: var(--accent-primary);
}

.getting-started-steps a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--accent-primary);
    transition: width 0.3s ease;
}

.getting-started-steps a:hover {
    color: var(--accent-secondary) !important;
}

.getting-started-steps a:hover::after {
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .hero-container {
        min-height: auto;
    }
    
    .hero-content {
        padding: 2rem 1rem;
    }
    
    .display-3 {
        font-size: 2.5rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-stat {
        padding-right: 1rem;
        margin-bottom: 1rem;
    }
    
    .hero-stat-value {
        font-size: 1.75rem;
    }
    
    .section-line {
        display: none;
    }
    
    .stat-value-dark {
        font-size: 2.5rem;
    }
    
    .icon-circle {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .stat-column {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .stat-column:last-child {
        border-bottom: none;
    }
}

@media (max-width: 768px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .hero-container {
        min-height: auto;
        margin-top: 0;
    }
    
    .p-5 {
        padding: 1.5rem !important;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .action-buttons {
        justify-content: center;
        width: 100%;
    }
    
    .display-3 {
        font-size: 2rem;
    }
    
    .display-4 {
        font-size: 1.75rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .hero-stats {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
        gap: 0.5rem !important;
        margin: 1.5rem auto;
    }
    
    .hero-stat {
        padding-right: 0.5rem;
        margin-right: 0;
        padding-bottom: 0.5rem;
        width: 33.333%;
    }
    
    .hero-stat-value {
        font-size: 1.5rem;
    }
    
    .hero-stat-label {
        font-size: 0.7rem;
    }
    
    .hero-stat:not(:last-child)::after {
        display: none;
    }
    
    .d-flex.flex-wrap.gap-3.mb-2 {
        justify-content: center;
    }
    
    .card-body {
        padding: 1.25rem;
    }
    
    .step-number {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-stat {
        width: 33.333%;
        padding-right: 0.25rem;
        padding-left: 0.25rem;
    }
    
    .hero-stats {
        gap: 0 !important;
        padding: 0 0.5rem;
    }
    
    .hero-stat-value {
        font-size: 1.25rem;
        margin-bottom: 0.1rem;
    }
    
    .hero-stat-label {
        font-size: 0.65rem;
        margin-top: 0.25rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .display-3 {
        font-size: 1.75rem;
    }
    
    .display-4 {
        font-size: 1.5rem;
    }
}

/* Remove any potential grey lines */
h1, h2, h3, h4, h5, h6,
.section-title,
.section-title * {
    border-bottom: none !important;
    box-shadow: none !important;
}

/* Section separator vertical spacing */
.mb-5 {
    margin-bottom: 3rem !important;
}

/* Low Stock button glow effect */
.low-stock-btn {
    background-color: transparent;
    border-color: #f59e0b;
    color: #f59e0b;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.3s ease;
}

.low-stock-btn:hover {
    background-color: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b;
    color: #f59e0b;
    transform: translateY(-2px);
}

.glow-effect {
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.5);
    animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}