/* NEW ACCESSIBILITY WIDGET STYLES */
.acc-widget-new {
    position: fixed !important;
    top: 120px !important;
    right: 20px !important;
    background: #000000 !important;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(255, 255, 0, 0.3);
    z-index: 999 !important;
    padding: 15px;
    display: flex !important;
    flex-direction: column;
    gap: 15px;
    border: 2px solid #ffff00;
}

.acc-btn-visual,
.acc-btn-audio,
.acc-btn-declaration {
    background: #000000;
    border: 2px solid #ffff00;
    color: #0099ff;
    font-size: 2rem;
    padding: 0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    overflow: hidden;
}

.acc-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Filter wyłączony dla PNG - ikony mają już właściwy kolor */
    /* filter: brightness(0) saturate(100%) invert(50%) sepia(100%) saturate(2000%) hue-rotate(180deg); */
    transition: all 0.3s ease;
}

.acc-btn-visual:hover,
.acc-btn-audio:hover,
.acc-btn-declaration:hover {
    background: #ffff00;
    color: #000000;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 255, 0, 0.6);
}

/* Hover dla ikon PNG - bez zmian koloru, ikony mają już właściwy kolor */

.acc-panel {
    position: fixed !important;
    top: 140px !important;
    right: 100px !important;
    background: #000000 !important;
    border: 3px solid #ffff00;
    border-radius: 15px;
    padding: 20px;
    width: 320px;
    box-shadow: 0 10px 40px rgba(255, 255, 0, 0.4);
    z-index: 998 !important;
    display: none;
}

.acc-panel h3 {
    color: #ffff00;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.3rem;
    text-transform: uppercase;
    border-bottom: 2px solid #ffff00;
    padding-bottom: 10px;
}

.acc-panel .acc-option {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #000000;
    border: 2px solid #ffff00;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.acc-panel .acc-option:hover {
    background: #1a1a1a;
    box-shadow: 0 0 15px rgba(255, 255, 0, 0.3);
}

.acc-panel .acc-option label {
    color: #ffff00;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    flex: 1;
}

.acc-panel .acc-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #ffff00;
}

.acc-panel .acc-option input[type="range"] {
    flex: 1;
    cursor: pointer;
    accent-color: #ffff00;
}

.acc-panel .acc-option button {
    width: 100%;
    padding: 12px;
    background: #ffff00;
    color: #000000;
    border: 2px solid #ffff00;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.acc-panel .acc-option button:hover {
    background: #000000;
    color: #ffff00;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 0, 0.4);
}

.acc-panel .acc-stop-btn {
    width: 100%;
    padding: 12px;
    background: #ff0000;
    color: #ffffff;
    border: 2px solid #ff0000;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-top: 10px;
}

.acc-panel .acc-stop-btn:hover {
    background: #cc0000;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
}

#speed-value {
    color: #ffff00;
    font-weight: 700;
}

/* OLD ACCESSIBILITY WIDGET STYLES */
.acc-widget {
    position: fixed;
    top: 140px;
    right: 20px;
    width: 320px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    z-index: 9999;
    padding: 20px;
    transition: var(--transition);
}

/* Widget collapsed by default - CRITICAL */
.acc-widget.collapsed .acc-content {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

.acc-widget.collapsed {
    width: auto !important;
    height: auto !important;
    padding: 12px 18px !important;
    background: var(--gold) !important;
    box-shadow: 0 4px 20px rgba(145, 111, 69, 0.4) !important;
    bottom: auto !important;
    overflow: visible !important;
    border-radius: 25px !important;
}

.acc-widget.collapsed h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.acc-widget.collapsed h2 span {
    color: white;
    font-size: 1rem;
    font-weight: 700;
}

.acc-widget.collapsed .acc-toggle-btn {
    background: white;
    color: var(--gold);
    border: 2px solid white;
}

.acc-widget.collapsed .acc-toggle-btn:hover {
    background: var(--gold-light);
    color: white;
    border-color: white;
    transform: scale(1.1);
}

.acc-widget.minimized {
    padding: 15px;
    width: auto;
    max-width: none;
    background: #916f45;
    border-radius: 10px;
}

.acc-widget.minimized h2 {
    margin-bottom: 0;
    flex-direction: column;
    gap: 5px;
}

.acc-widget.minimized h2 span {
    display: block;
    color: white;
    font-size: 0.7rem;
    text-align: center;
    white-space: nowrap;
}

.acc-widget.minimized .acc-content {
    display: none;
}

.acc-widget.minimized .acc-toggle-btn {
    background: white;
    color: #916f45;
}

.acc-widget.hidden {
    display: none;
}

.acc-master-toggle {
    width: 100%;
    padding: 15px;
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.95rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.acc-master-toggle:hover {
    background: #916f45;
    transform: translateY(-2px);
}

.acc-master-toggle.active {
    background: #2e7d32;
}

.acc-master-toggle.active:hover {
    background: #388e3c;
}

.acc-widget h2 {
    margin-top: 0;
    font-size: 1.2rem;
    color: #1a1a1a;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.acc-toggle-btn {
    background: var(--gold);
    border: 2px solid var(--gold);
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
    transition: var(--transition);
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(145, 111, 69, 0.3);
}

.acc-toggle-btn:hover {
    transform: scale(1.1);
    background: var(--gold-light);
    border-color: var(--gold-light);
    box-shadow: 0 4px 12px rgba(145, 111, 69, 0.5);
}

.acc-option {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.acc-option:hover {
    background: #e8e8e8;
}

.acc-option label {
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    flex: 1;
}

.acc-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.acc-option input[type="range"] {
    flex: 1;
    cursor: pointer;
}

.acc-option button {
    width: 100%;
    padding: 10px;
    background: #916f45;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    font-size: 0.85rem;
}

.acc-option button:hover {
    background: #c5a47e;
    transform: translateY(-2px);
}

.acc-stop-btn {
    width: 100%;
    padding: 12px;
    background: #d32f2f;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-top: 10px;
}

.acc-stop-btn:hover {
    background: #b71c1c;
    transform: scale(1.05);
}

#reading-guide {
    position: fixed;
    left: 0;
    width: 100%;
    height: 2px;
    background: transparent;
    border-top: 2px solid #916f45;
    border-bottom: 2px solid #916f45;
    pointer-events: none;
    display: none;
    z-index: 9998;
    transform: translateY(-50%);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Reading guide in high contrast - make it more visible but not cover text */
body.high-contrast #reading-guide {
    background: transparent;
    border-top: 3px solid #ffff00;
    border-bottom: 3px solid #ffff00;
    height: 3px;
    box-shadow: 0 0 15px #ffff00;
    opacity: 0.8;
}

/* HIGH CONTRAST MODE - Complete Coverage */
body.high-contrast {
    background-color: #000000 !important;
    color: #ffff00 !important;
}

body.high-contrast * {
    border-color: #ffff00 !important;
}

/* Navigation */
body.high-contrast nav {
    background: #000000 !important;
    border-bottom: 3px solid #ffff00 !important;
}

body.high-contrast .nav-links a {
    color: #ffff00 !important;
    background: transparent !important;
}

body.high-contrast .nav-links a:hover,
body.high-contrast .nav-links a.active {
    color: #000 !important;
    background: #ffff00 !important;
}

body.high-contrast .contact-btn {
    background: #ffff00 !important;
    color: #000 !important;
}

/* Sections and Backgrounds */
body.high-contrast .hero,
body.high-contrast section,
body.high-contrast .about-right,
body.high-contrast footer,
body.high-contrast div {
    background: #000000 !important;
}

/* Cards and Boxes */
body.high-contrast .service-card,
body.high-contrast .carousel-item,
body.high-contrast .timeline-box,
body.high-contrast .trusted-company,
body.high-contrast .article-card,
body.high-contrast .knowledge-card,
body.high-contrast .info-box,
body.high-contrast .content-box,
body.high-contrast .offer-card,
body.high-contrast .offer-box,
body.high-contrast .offer-item,
body.high-contrast .service-box,
body.high-contrast .feature-box,
body.high-contrast .price-box {
    background: #000000 !important;
    color: #ffff00 !important;
    border: 3px solid #ffff00 !important;
}

/* Hover states in high contrast - only thicker border, no background change */
body.high-contrast .service-card:hover,
body.high-contrast .carousel-item:hover,
body.high-contrast .timeline-box:hover,
body.high-contrast .trusted-company:hover,
body.high-contrast .article-card:hover,
body.high-contrast .knowledge-card:hover,
body.high-contrast .info-box:hover,
body.high-contrast .content-box:hover,
body.high-contrast .offer-card:hover,
body.high-contrast .offer-box:hover,
body.high-contrast .offer-item:hover,
body.high-contrast .service-box:hover,
body.high-contrast .feature-box:hover,
body.high-contrast .price-box:hover {
    background: #000000 !important;
    color: #ffff00 !important;
    border: 5px solid #ffff00 !important;
    box-shadow: 0 0 25px #ffff00 !important;
}

/* Headings */
body.high-contrast h1,
body.high-contrast h2,
body.high-contrast h3,
body.high-contrast h4,
body.high-contrast h5,
body.high-contrast h6 {
    background: transparent !important;
    color: #ffff00 !important;
}

/* Paragraphs and Text */
body.high-contrast p,
body.high-contrast li,
body.high-contrast span,
body.high-contrast label,
body.high-contrast td,
body.high-contrast th {
    color: #ffff00 !important;
    background: transparent !important;
}

/* Links */
body.high-contrast a {
    color: #00ffff !important;
    text-decoration: underline !important;
    background: transparent !important;
}

body.high-contrast a:hover {
    color: #000 !important;
    background: #00ffff !important;
}

/* Buttons */
body.high-contrast button,
body.high-contrast .btn-modern,
body.high-contrast input[type="submit"] {
    background: #ffff00 !important;
    color: #000 !important;
    border: 3px solid #ffff00 !important;
}

body.high-contrast button:hover,
body.high-contrast .btn-modern:hover {
    background: #000 !important;
    color: #ffff00 !important;
    border: 3px solid #ffff00 !important;
}

/* Forms */
body.high-contrast input,
body.high-contrast textarea,
body.high-contrast select {
    background: #000 !important;
    color: #ffff00 !important;
    border: 2px solid #ffff00 !important;
}

body.high-contrast input:focus,
body.high-contrast textarea:focus,
body.high-contrast select:focus {
    outline: 3px solid #00ffff !important;
}

/* Accessibility Widget */
body.high-contrast .acc-widget {
    background: #000 !important;
    border: 4px solid #ffff00 !important;
    box-shadow: 0 0 20px #ffff00 !important;
}

body.high-contrast .acc-widget.collapsed {
    background: #000 !important;
    border: 4px solid #ffff00 !important;
}

body.high-contrast .acc-toggle-btn {
    background: #ffff00 !important;
    color: #000 !important;
    border: 2px solid #ffff00 !important;
}

body.high-contrast .acc-option {
    background: #000 !important;
    border: 2px solid #ffff00 !important;
}

/* Images - add yellow border */
body.high-contrast img {
    border: 3px solid #ffff00 !important;
    opacity: 0.9 !important;
}

/* Logo */
body.high-contrast .logo img {
    filter: brightness(0) invert(1) !important;
}

/* Footer */
body.high-contrast footer {
    background: #000 !important;
    color: #ffff00 !important;
    border-top: 3px solid #ffff00 !important;
}

/* TTS Active Indicator */
body.tts-active {
    cursor: help !important;
}

body.tts-active h1,
body.tts-active h2,
body.tts-active h3,
body.tts-active h4,
body.tts-active h5,
body.tts-active h6,
body.tts-active p,
body.tts-active a,
body.tts-active button,
body.tts-active li,
body.tts-active label,
body.tts-active span {
    cursor: help !important;
}

body.tts-active h1:hover,
body.tts-active h2:hover,
body.tts-active h3:hover,
body.tts-active h4:hover,
body.tts-active h5:hover,
body.tts-active h6:hover,
body.tts-active p:hover,
body.tts-active a:hover,
body.tts-active button:hover,
body.tts-active li:hover,
body.tts-active label:hover,
body.tts-active span:hover {
    background: rgba(145, 111, 69, 0.1);
    outline: 2px solid rgba(145, 111, 69, 0.3);
    outline-offset: 2px;
}

/* TTS hover in high contrast - maintain contrast */
body.high-contrast.tts-active h1:hover,
body.high-contrast.tts-active h2:hover,
body.high-contrast.tts-active h3:hover,
body.high-contrast.tts-active h4:hover,
body.high-contrast.tts-active h5:hover,
body.high-contrast.tts-active h6:hover,
body.high-contrast.tts-active p:hover,
body.high-contrast.tts-active a:hover,
body.high-contrast.tts-active button:hover,
body.high-contrast.tts-active li:hover,
body.high-contrast.tts-active label:hover,
body.high-contrast.tts-active span:hover {
    background: transparent !important;
    outline: 3px solid #ffff00 !important;
    outline-offset: 3px;
    box-shadow: 0 0 10px #ffff00 !important;
}

/* Responsive Mobile Styles for NEW Widget */
@media (max-width: 768px) {
    .acc-widget-new {
        top: 120px;
        right: 10px;
        padding: 10px;
    }
    
    .acc-btn-visual,
    .acc-btn-audio,
    .acc-btn-declaration {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        padding: 0;
    }
    
    .acc-panel {
        right: 70px;
        width: calc(100vw - 100px);
        max-width: 280px;
    }
    
    .acc-panel h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .acc-widget-new {
        top: 100px;
        right: 5px;
        padding: 8px;
        gap: 8px;
    }
    
    .acc-btn-visual,
    .acc-btn-audio,
    .acc-btn-declaration {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
        padding: 0;
    }
    
    .acc-panel {
        top: 100px;
        right: 60px;
        width: calc(100vw - 80px);
        max-width: 250px;
        padding: 15px;
    }
    
    .acc-panel h3 {
        font-size: 1rem;
        margin-bottom: 15px;
    }
    
    .acc-panel .acc-option {
        padding: 8px;
        margin-bottom: 10px;
    }
    
    .acc-panel .acc-option label {
        font-size: 0.85rem;
    }
    
    .acc-panel .acc-option button {
        padding: 10px;
        font-size: 0.85rem;
    }
}

/* OLD Responsive Mobile Styles */
@media (max-width: 768px) {
    .acc-widget {
        position: fixed;
        top: 120px;
        bottom: 10px;
        right: 10px;
        left: auto;
        width: calc(100% - 20px);
        max-width: 400px;
        max-height: none;
        height: calc(100vh - 130px);
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }
    
    .acc-widget .acc-content {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Collapsed state on tablet */
    .acc-widget.collapsed {
        top: 120px !important;
        bottom: auto !important;
        left: auto !important;
        right: 10px !important;
        width: auto !important;
        height: auto !important;
        max-height: none !important;
        padding: 8px 14px !important;
        display: block !important;
        overflow: visible !important;
        flex-direction: row !important;
    }
    
    .acc-widget.collapsed .acc-content {
        display: none !important;
    }
    
    .acc-widget.collapsed h2 {
        font-size: 0.95rem;
    }
    
    .acc-widget.collapsed h2 span {
        font-size: 0.95rem;
    }
    
    .acc-widget.collapsed .acc-toggle-btn {
        font-size: 1.1rem;
        padding: 6px 10px;
    }
    
    .acc-widget h2 {
        font-size: 1rem;
    }
    
    .acc-option {
        padding: 8px;
        font-size: 0.9rem;
    }
    
    .acc-option button {
        font-size: 0.85rem;
        padding: 8px 12px;
    }
    
    .acc-show-btn {
        bottom: 20px;
        right: 10px;
        padding: 12px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .acc-widget {
        position: fixed;
        top: 120px;
        bottom: 10px;
        right: 10px;
        left: auto;
        width: calc(100% - 20px);
        max-width: 350px;
        max-height: none;
        height: calc(100vh - 130px);
        padding: 12px;
        overflow-y: hidden;
        display: flex;
        flex-direction: column;
    }
    
    .acc-widget .acc-content {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Collapsed state on phone - VERY IMPORTANT */
    .acc-widget.collapsed {
        top: 120px !important;
        bottom: auto !important;
        left: auto !important;
        right: 10px !important;
        width: auto !important;
        height: auto !important;
        max-height: none !important;
        max-width: none !important;
        padding: 6px 12px !important;
        display: block !important;
        overflow: visible !important;
        flex-direction: row !important;
    }
    
    .acc-widget.collapsed .acc-content {
        display: none !important;
    }
    
    .acc-widget.collapsed h2 {
        font-size: 0.85rem;
        gap: 8px;
    }
    
    .acc-widget.collapsed h2 span {
        font-size: 0.85rem;
    }
    
    .acc-widget.collapsed .acc-toggle-btn {
        font-size: 1rem;
        padding: 5px 8px;
    }
    
    .acc-widget h2 {
        font-size: 0.9rem;
    }
    
    .acc-option {
        padding: 6px;
        font-size: 0.85rem;
        margin-bottom: 8px;
    }
    
    .acc-option button {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
    
    .acc-widget {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: var(--gold) #f0f0f0;
    }
    
    .acc-widget::-webkit-scrollbar {
        width: 5px;
    }
    
    .acc-widget::-webkit-scrollbar-track {
        background: #f0f0f0;
        border-radius: 3px;
    }
    
    .acc-widget::-webkit-scrollbar-thumb {
        background: var(--gold);
        border-radius: 3px;
    }
    
    .acc-toggle-btn {
        font-size: 1.1rem;
        padding: 5px 8px;
    }
    
    .acc-show-btn {
        bottom: 10px;
        right: 5px;
        padding: 10px 14px;
        font-size: 0.85rem;
    }
}

.read-item {
    padding: 5px;
    border-radius: 5px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.read-item:hover,
.read-item:focus {
    background: rgba(145, 111, 69, 0.1);
    outline: 2px solid #916f45;
    outline-offset: 3px;
}

*:focus-visible {
    outline: 4px solid #916f45 !important;
    outline-offset: 3px !important;
}

.skip-link {
    position: absolute;
    top: -200px;
    left: 20px;
    background: #1a1a1a;
    color: white;
    padding: 15px 25px;
    z-index: 10001;
    text-decoration: none;
    font-weight: 700;
    border-radius: 5px;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 20px;
}
