/* ==========================================================================
   ELEKTRYK LESZNO — main.css
   Custom styles uzupełniające Tailwind CDN
   Aktualizacja: 04.05.2026 — refactor: dodano sekcje Blog Article + FAQ Accordion
   ========================================================================== */


/* ==========================================================================
   Variables (Custom Properties)
   ========================================================================== */

:root {
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --bg-body: #fafafa;
}


/* ==========================================================================
   Body / Base
   ========================================================================== */

body {
    background-color: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* ==========================================================================
   Hero — Blueprint Grid Background
   ========================================================================== */

.bg-blueprint {
    background-image:
        linear-gradient(rgba(24, 24, 27, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(24, 24, 27, 0.04) 1px, transparent 1px);
    background-size: 32px 32px;
}


/* ==========================================================================
   Reveal-on-Scroll Animation
   Aktywowane przez IntersectionObserver z main.js
   ========================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }


/* ==========================================================================
   Marquee — Pause on Hover (dostępność, redukcja bodźców)
   ========================================================================== */

.marquee-track:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    0%   { transform: translateX(0%); }
    100% { transform: translateX(-100%); }
}

.animate-marquee {
    animation: marquee 30s linear infinite;
}


/* ==========================================================================
   Accessibility — Focus Rings (WCAG)
   ========================================================================== */

a:focus-visible,
button:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 2px;
}


/* ==========================================================================
   Scrollbar (custom)
   ========================================================================== */

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f4f4f5; }
::-webkit-scrollbar-thumb { background: #d4d4d8; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a1a1aa; }


/* ==========================================================================
   Details / Summary Reset (Firefox + Safari)
   ========================================================================== */

details > summary {
    list-style: none;
}

details > summary::-webkit-details-marker {
    display: none;
}


/* ==========================================================================
   FAQ Accordion — Mobile Layout Fix
   Wcześniej powielane inline w 6 plikach (blog index, 3 artykuły, elektryk-gora, elektryk-wolsztyn)
   ========================================================================== */

@media (max-width: 640px) {
    .faq-accordion summary {
        flex-wrap: wrap;
        padding-right: 2.5rem;
        position: relative;
    }
    .faq-accordion summary i.ph-caret-down {
        position: absolute;
        right: 1rem;
        top: 1.1rem;
    }
}


/* ==========================================================================
   Blog Article — .prose styles
   Dla treści artykułów blogowych (3 pliki w /blog/)
   Wcześniej powielane inline ~17 linii × 3 pliki
   ========================================================================== */

.prose h2 {
    font-family: 'Cabinet Grotesk', sans-serif;
    font-weight: 900;
    font-size: 1.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #18181b;
}

.prose h3 {
    font-family: 'Cabinet Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: #27272a;
}

.prose p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: #3f3f46;
}

.prose ul,
.prose ol {
    margin: 1rem 0 1.5rem 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: #3f3f46;
}

.prose strong {
    color: #18181b;
    font-weight: 700;
}

.prose a {
    color: #d97706;
    text-decoration: underline;
}

.prose table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.prose th {
    background: #18181b;
    color: white;
    text-align: left;
    padding: 0.75rem 1rem;
    font-weight: 700;
}

.prose td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e4e4e7;
}

.prose tr:nth-child(even) td {
    background: #fafafa;
}

.prose blockquote {
    background: #fafafa;
    border-left: 4px solid #f59e0b;
    padding: 1.25rem;
    margin: 1rem 0;
    font-style: italic;
    color: #3f3f46;
}

/* Fact box (używane w pomiary-elektryczne-do-banku) */
.fact-box {
    background: #fef3c7;
    border-left: 4px solid #d97706;
    padding: 1.25rem;
    margin: 1.5rem 0;
    border-radius: 6px;
}

.fact-box strong {
    color: #92400e;
}

/* Mobile — tabele scrollowane poziomo */
@media (max-width: 640px) {
    .prose table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
        box-shadow: inset -8px 0 8px -8px rgba(0, 0, 0, 0.15);
    }
    .prose td,
    .prose th {
        white-space: normal;
        word-break: break-word;
        min-width: 140px;
    }
    /* Blog index — table scroll wrapper */
    table { max-width: 100%; }
    .table-scroll {
        box-shadow: inset -8px 0 8px -8px rgba(0, 0, 0, 0.15);
    }
}


/* ==========================================================================
   Print Styles — dla drukowania cennika
   ========================================================================== */

@media print {
    nav,
    .sticky-mobile-bar,
    .marquee-track,
    footer {
        display: none !important;
    }
    body {
        background: white !important;
        color: black !important;
    }
}
