/* Style dla przełącznika trybów dzień/noc */
.theme-switch-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 20px;
    margin-right: 20px;
    z-index: 100;
}

/* Styles for the theme switcher in header */
header .theme-switch-wrapper {
    margin-left: 20px;
    display: flex !important; /* Wymuszenie wyświetlania na wszystkich urządzeniach */
    background: rgba(40, 40, 50, 0.85);
    border-radius: 20px; 
    padding: 5px 10px;
    border: 1px solid #444;
    box-shadow: 0 3px 12px rgba(0,0,0,0.3);
}

/* Responsive styles for the theme switcher */
@media (max-width: 900px) {
    header .theme-switch-wrapper {
        display: none !important; /* Hide in header on mobile devices */
    }
}

.theme-switch {
    display: inline-block;
    height: 24px;
    position: relative;
    width: 48px;
    margin-top: 2px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: rgba(30,30,40,0.7);
    backdrop-filter: blur(4px);
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: 0.4s;
    border: 1px solid #333;
    display: flex;
    align-items: center;
}

.slider:before {
    background-color: #ff6b35;
    bottom: 2px;
    content: "";
    height: 18px;
    left: 3px;
    position: absolute;
    transition: 0.4s;
    width: 18px;
    z-index: 2;
}

input:checked + .slider {
    background-color: rgba(230,230,245,0.7);
}

input:checked + .slider:before {
    transform: translateX(24px);
    background-color: #ff6b35;
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.icon-sun, .icon-moon {
    position: absolute;
    top: 3px;
    font-size: 12px;
    transition: opacity 0.3s ease;
}

.icon-sun {
    opacity: 0;
    right: 6px;
}

.icon-moon {
    opacity: 1;
    left: 6px;
}

input:checked + .slider .icon-sun {
    opacity: 1;
}

input:checked + .slider .icon-moon {
    opacity: 0;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
}

/* Style dla trybu jasnego */
body.light-mode {
    background-color: #f5f5f7;
    color: #333;
}

/* Header w trybie jasnym */
body.light-mode header {
    background: rgba(245,245,247,0.8);
}

body.light-mode .nav-links a {
    color: #555;
}

body.light-mode .nav-links a:hover,
body.light-mode .nav-links a.active {
    color: #ff6b35;
}

/* Hero section w trybie jasnym */
body.light-mode .hero {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f4 100%);
}

body.light-mode .hero-content h1 {
    color: #222;
}

body.light-mode .hero-content h2 {
    color: #555;
}

body.light-mode .hero-rects-bg .symbol {
    color: rgba(0, 0, 0, 0.7);
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
}

body.light-mode .rect-anim {
    background: linear-gradient(135deg, #ff6b35 0%, #ffb88c 100%);
    opacity: 0.28;
    box-shadow: 0 4px 32px 0 rgba(255, 107, 53, 0.25);
}

/* Buttony w trybie jasnym */
body.light-mode .btn-primary {
    background: #ff6b35;
    color: white;
}

body.light-mode .btn-secondary {
    background: transparent;
    color: #333;
    border: 1px solid #999;
}

body.light-mode .btn-secondary:hover {
    border-color: #ff6b35;
    color: #ff6b35;
}

/* Footer w trybie jasnym */
body.light-mode footer {
    background-color: #f0f0f4;
    color: #333;
    border-top: 1px solid #ddd;
}

body.light-mode footer a {
    color: #444;
}

body.light-mode footer a:hover {
    color: #ff6b35;
}

/* Cookie banner w trybie jasnym */
body.light-mode #cookie-banner {
    background: rgba(245,245,247,0.9);
    border-top: 2px solid #ff6b35;
}

body.light-mode #cookie-banner span {
    color: #333;
}

/* Przełącznik trybu jasnego/ciemnego w trybie ciemnym */
body.dark-mode .theme-switch-wrapper {
    background: rgba(30,30,40,0.98);
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    padding: 2px 10px;
    border: 1px solid #222;
}
body.dark-mode .theme-switch .slider {
    background-color: #23232b;
    border: 1px solid #444;
}
body.dark-mode .theme-switch input:checked + .slider {
    background-color: #2d2d36;
}
body.dark-mode .theme-switch .icon-sun {
    color: #ffe082;
    filter: drop-shadow(0 0 2px #fff6c1);
}
body.dark-mode .theme-switch .icon-moon {
    color: #fff;
}

/* Responsive */
@media (max-width: 767px) {
    .nav-links .theme-switch-wrapper {
        display: none; /* Ukrywamy przełącznik w menu na urządzeniach mobilnych */
    }
    
    body.light-mode .mobile-bottom-nav {
        background: rgba(245,245,247,0.9);
        border-top: 1px solid #ddd;
    }
    
    body.light-mode .mobile-bottom-nav a {
        color: #555;
    }
    
    /* Dodajemy przełącznik do menu mobilnego */
    .mobile-theme-switch {
        display: flex;
        justify-content: center;
        margin-top: 15px;
        margin-bottom: 5px;
    }
}

.theme-switch-wrapper::after {
    content: "Zmień motyw";
    color: #fff;
    font-size: 12px;
    margin-left: 6px;
    opacity: 0.85;
    white-space: nowrap;
}

/* Zwiększenie wielkości przełącznika dla lepszej widoczności */
header .theme-switch {
    height: 28px;
    width: 56px;
}

header .slider:before {
    height: 22px;
    width: 22px;
}

header input:checked + .slider:before {
    transform: translateX(26px);
}

/* Dodatkowy wyróżniający styl dla przełącznika w nagłówku strony głównej */
#header-theme-switch {
    position: fixed;
    top: 20px;
    right: 40px;
    background: rgba(255, 107, 53, 0.8) !important;
    border: 3px solid #ff6b35 !important;
    box-shadow: 0 0 25px rgba(255, 107, 53, 0.8) !important;
    animation: pulse-theme-switch 1.5s infinite alternate;
    padding: 8px 15px;
    z-index: 9999;
    border-radius: 40px !important;
}

@keyframes pulse-theme-switch {
    from { 
        box-shadow: 0 0 15px rgba(255, 107, 53, 0.8); 
        transform: scale(1);
    }
    to { 
        box-shadow: 0 0 35px rgba(255, 255, 255, 0.8); 
        transform: scale(1.05);
    }
}

#header-theme-switch::after {
    content: "PRZEŁĄCZ TRYB" !important;
    font-weight: bold;
    font-size: 14px;
    color: white;
    text-shadow: 0 0 5px rgba(0,0,0,0.8);
    letter-spacing: 1px;
}

#header-theme-switch .slider {
    background-color: rgba(255, 255, 255, 0.3) !important;
    border-color: white !important;
}

#header-theme-switch .slider:before {
    height: 24px !important;
    width: 24px !important;
    background-color: white !important;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

/* Zwiększenie widoczności ikon */
#header-theme-switch .icon-sun, 
#header-theme-switch .icon-moon {
    font-size: 16px !important;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.8));
}
