@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* Base Styles & Custom Fonts */
:root {
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    /* Wire Accent Colors */
    --color-live-amber: #F59E0B;
    --color-neutral-blue: #3B82F6;
    --color-earth-green: #10B981;
    --color-bg-dark: #070A13;
    --color-panel-grey: #171E2E;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-dark);
    color: #F3F4F6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

/* Glassmorphism helpers */
.glass-panel {
    background: rgba(23, 30, 46, 0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-panel-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel-hover:hover {
    background: rgba(23, 30, 46, 0.75);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #0B0F19;
}

::-webkit-scrollbar-thumb {
    background: #1F2937;
    border-radius: 5px;
    border: 2px solid #0B0F19;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-neutral-blue);
    box-shadow: 0 0 10px var(--color-neutral-blue);
}

/* Glowing Neon Borders and Shadows */
.glow-amber {
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.4);
    transition: all 0.3s ease;
}

.glow-amber:hover {
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.55), inset 0 0 8px rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.9);
}

.glow-blue {
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    transition: all 0.3s ease;
}

.glow-blue:hover {
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.55), inset 0 0 8px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.9);
}

.glow-green {
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
    transition: all 0.3s ease;
}

.glow-green:hover {
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.55), inset 0 0 8px rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.9);
}

/* Pulsing indicators */
@keyframes ledPulseGreen {
    0%, 100% { box-shadow: 0 0 8px #10B981, 0 0 15px #10B981; opacity: 1; }
    50% { box-shadow: 0 0 3px #10B981, 0 0 8px #10B981; opacity: 0.7; }
}

@keyframes ledPulseRed {
    0%, 100% { box-shadow: 0 0 8px #EF4444, 0 0 15px #EF4444; opacity: 1; }
    50% { box-shadow: 0 0 3px #EF4444, 0 0 8px #EF4444; opacity: 0.7; }
}

@keyframes ledPulseAmber {
    0%, 100% { box-shadow: 0 0 8px #F59E0B, 0 0 15px #F59E0B; opacity: 1; }
    50% { box-shadow: 0 0 3px #F59E0B, 0 0 8px #F59E0B; opacity: 0.7; }
}

.led-indicator-green {
    background-color: #10B981;
    animation: ledPulseGreen 2s infinite ease-in-out;
}

.led-indicator-red {
    background-color: #EF4444;
    animation: ledPulseRed 2s infinite ease-in-out;
}

.led-indicator-amber {
    background-color: #F59E0B;
    animation: ledPulseAmber 2s infinite ease-in-out;
}

/* Slow-moving background effect for the hero section */
.hero-animated-bg {
    animation: slowPanEffect 50s linear infinite alternate;
    background-size: 130% auto;
}

@keyframes slowPanEffect {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* Electrical line drawing animation */
.circuit-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawCircuitLine 6s linear infinite forwards;
}

@keyframes drawCircuitLine {
    0% { stroke-dashoffset: 1000; }
    50% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -1000; }
}

/* Spark animations */
.sparkle-btn {
    position: relative;
    overflow: hidden;
}

.sparkle-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 45%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 55%
    );
    transform: rotate(45deg);
    transition: none;
}

.sparkle-btn:hover::after {
    animation: buttonSpark 1.2s ease-out;
}

@keyframes buttonSpark {
    0% { left: -120%; }
    100% { left: 120%; }
}

/* Chatbot Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    column-gap: 4px;
    padding: 10px 15px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background-color: #E5E7EB;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}

/* Testimonial slider transitions */
.fade-in {
    opacity: 0;
    animation: fadeInAnimation 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.fade-out {
    opacity: 1;
    animation: fadeOutAnimation 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

@keyframes fadeOutAnimation {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-8px); }
}

/* Lightbox Modal overlay styling */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(7, 10, 19, 0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    opacity: 1;
    pointer-events: auto;
}

/* Breaker Switch design for Calendar cells */
.breaker-switch-cell {
    position: relative;
    border: 1px solid #374151;
    background: #111827;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.6);
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.breaker-switch-cell::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 1px;
}

.breaker-status-light {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin: 0 auto 6px auto;
    background-color: #374151;
    transition: all 0.3s ease;
}

.breaker-active-available .breaker-status-light {
    background-color: #10B981;
    box-shadow: 0 0 10px #10B981, 0 0 4px #10B981;
}

.breaker-active-booked .breaker-status-light {
    background-color: #EF4444;
    box-shadow: 0 0 10px #EF4444, 0 0 4px #EF4444;
}

.breaker-today {
    border-color: var(--color-live-amber);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.3), inset 0 2px 4px rgba(0,0,0,0.6);
}

/* Circuit board footer texture */
.footer-texture {
    background-color: #070A13;
    background-image: radial-gradient(rgba(59, 130, 246, 0.15) 1px, transparent 0),
                      radial-gradient(rgba(245, 158, 11, 0.1) 1.5px, transparent 0);
    background-size: 24px 24px;
    background-position: 0 0, 12px 12px;
}

/* Gallery Hover Card Text overlay */
.gallery-hover-card {
    position: relative;
    overflow: hidden;
}

.gallery-hover-card img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-hover-card:hover img {
    transform: scale(1.08);
}

.gallery-hover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(7, 10, 19, 0.95) 0%, rgba(7, 10, 19, 0.4) 60%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.25rem;
}

.gallery-hover-card:hover .gallery-hover-overlay {
    opacity: 1;
}