/* Glk Electrical Services — site styles (MudBlazor provides the rest) */

html, body {
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
}

/* Startup splash while WebAssembly loads */
.app-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 1rem;
    color: #10316B;
    font-size: 1.1rem;
}

.app-loading-bolt {
    font-size: 4rem;
    animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.92); }
}

/* Hero banner on the home page */
.hero {
    background: linear-gradient(135deg, #10316B 0%, #1B4A9C 55%, #0B2144 100%);
    color: #fff;
}

.hero-title {
    color: #fff;
    font-weight: 700;
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.85);
}

.hero-outline-btn {
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
}

.hero-bolt {
    font-size: 14rem !important;
    width: 14rem !important;
    height: 14rem !important;
    color: #F5A623;
    filter: drop-shadow(0 0 24px rgba(245, 166, 35, 0.45));
}

.feature-card {
    text-align: center;
}

.cta-strip {
    background: linear-gradient(135deg, #10316B 0%, #1B4A9C 100%);
    color: #fff;
}

.footer {
    border-top: 3px solid #F5A623;
}

/* Quote page breakdown */
.quote-summary {
    position: sticky;
    top: 80px;
}

.breakdown-table td.amount {
    text-align: right;
    white-space: nowrap;
}

.discount-row td {
    color: var(--mud-palette-success);
}

/* ── Electric night-mode switch ───────────────────────────────── */
.power-switch {
    position: relative;
    width: 62px;
    height: 30px;
    border-radius: 18px;
    border: 2px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.power-switch-thumb {
    position: absolute;
    top: 2px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    color: #10316B;
    font-size: 13px;
    line-height: 22px;
    text-align: center;
    transition: transform 0.35s cubic-bezier(0.68, -0.3, 0.32, 1.3),
                background 0.3s, color 0.3s, box-shadow 0.3s;
}

.power-switch:hover {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.power-switch.on {
    background: #0B2144;
    border-color: #F5A623;
    box-shadow: 0 0 14px rgba(245, 166, 35, 0.65);
}

.power-switch.on .power-switch-thumb {
    transform: translateX(32px);
    background: #F5A623;
    color: #0B2144;
    box-shadow: 0 0 12px rgba(245, 166, 35, 0.9);
    animation: zap 0.5s ease-out;
}

@keyframes zap {
    0% { filter: brightness(1); }
    25% { filter: brightness(2.4); }
    40% { filter: brightness(0.7); }
    60% { filter: brightness(2); }
    100% { filter: brightness(1); }
}

/* ── Hero entrance + bolt flicker ─────────────────────────────── */
@keyframes fade-up {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}

.hero-title { animation: fade-up 0.6s ease-out both; }
.hero-subtitle { animation: fade-up 0.6s 0.15s ease-out both; }
.hero-actions { animation: fade-up 0.6s 0.3s ease-out both; }

.hero-bolt {
    animation: bolt-flicker 4s ease-in-out infinite;
}

@keyframes bolt-flicker {
    0%, 100% { opacity: 1; filter: drop-shadow(0 0 24px rgba(245, 166, 35, 0.45)); }
    42% { opacity: 1; }
    44% { opacity: 0.55; }
    46% { opacity: 1; }
    49% { opacity: 0.7; }
    51% { opacity: 1; filter: drop-shadow(0 0 38px rgba(245, 166, 35, 0.8)); }
    60% { filter: drop-shadow(0 0 24px rgba(245, 166, 35, 0.45)); }
}

/* ── Micro-interactions ───────────────────────────────────────── */
.feature-card,
.service-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover,
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 26px rgba(16, 49, 107, 0.2);
}

.mud-button-filled.mud-button-filled-secondary:hover {
    box-shadow: 0 0 14px rgba(245, 166, 35, 0.55);
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
    .hero-title, .hero-subtitle, .hero-actions, .hero-bolt,
    .app-loading-bolt, .power-switch.on .power-switch-thumb {
        animation: none !important;
    }

    .feature-card:hover, .service-card:hover, .gallery-card:hover {
        transform: none;
    }
}

/* Gallery */
.gallery-card {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gallery-card:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.gallery-lightbox {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

/* Blazor error UI */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}
