/* ============================
   PODSTAWOWE USTAWIENIA STRONY
============================ */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #000;
  color: #fff;
  padding-top: 60px; /* miejsce na menu */
}

/* ============================
   MENU GÓRNE
============================ */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  padding: 1px 0;
  z-index: 2000;
  border-bottom: 1px solid rgba(255, 0, 0, 0.2);
}

.top-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 40px;
  align-items: center; /* Dodane */
}

.top-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 24px;
  font-weight: bold;
  letter-spacing: 1px;
  transition: color 0.3s, text-shadow 0.3s, transform 0.3s;
  display: inline-flex;
  align-items: center;
}

.top-nav a:hover {
  color: #e00;
  text-shadow: 0 0 8px #e00;
  transform: translateX(3px);
}

.top-nav a.active {
    color: #e00;
    text-shadow: 0 0 8px #e00;
}

/* Dropdown Menu Styles */
.top-nav li.dropdown {
    position: relative;
    /* Create a safe area so mouse doesn't leave hover state when moving to dropdown */
    padding-bottom: 10px; 
    margin-bottom: -10px;
}

/* Specificity override for the dropdown ul */
.top-nav .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 8px;
    padding: 10px 0;
    min-width: 220px;
    flex-direction: column;
    gap: 0;
    z-index: 2005;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    margin-top: 5px; /* Spacing from the main link */
}

/* Show on hover */
.top-nav li.dropdown:hover .dropdown-menu {
    display: flex;
}

/* Dropdown items styling */
.top-nav .dropdown-menu li {
    width: 100%;
    display: block;
    margin: 0;
    text-align: left; /* Ensure text aligns left */
}

.top-nav .dropdown-menu .dropdown-item {
    font-size: 18px; /* Smaller than main menu */
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    white-space: nowrap;
    transition: background-color 0.2s, color 0.2s;
    justify-content: flex-start;
    width: 100%;
    box-sizing: border-box;
    text-shadow: none; /* Reset shadow */
}

.top-nav .dropdown-menu .dropdown-item:hover {
    background-color: rgba(255, 0, 0, 0.15);
    color: #e00;
    text-shadow: 0 0 5px rgba(238, 0, 0, 0.5);
    transform: none; /* Disable shift for smoother list interaction */
}

.top-nav .dropdown-menu .dropdown-item i {
    width: 20px; /* Fixed width for icons to align text */
    text-align: center;
}

/* ============================
   HERO + WIDEO TŁO
============================ */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 40px 20px;
  display: flex;
  justify-content: center;
}

#hero-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  background-color: #000;
}

/* TREŚĆ HERO */
.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  max-width: 800px;
  width: 100%;
  min-height: 100vh;
  gap: 30px;
}

.hero-text,
.info-box {
  background-color: rgba(0, 0, 0, 0.4);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
}

.hero-text h1 {
  font-size: 30px;
  margin-bottom: 15px;
}

.hero-text p {
  font-size: 24px;
  margin: 5px 0;
}

/* ============================
   INFO-BOX (Oferta, Galeria, Kontakt)
============================ */
.info-box h2 {
  color: #2ecc71;
  border-bottom: 2px solid #e00;
  padding-bottom: 5px;
  margin-bottom: 10px;
}

ul {
  list-style: square;
  padding-left: 10px;
  text-align: left;
  font-size: 24px;
}

#oferta ul {
  list-style: none;
  padding-left: 0;
}

#oferta ul li {
  margin-bottom: 12px;
  line-height: 1.4;
  position: relative;
  padding-left: 30px;
}

#oferta ul li::before {
  content: "\f1b9"; /* fa-car icon */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  color: #e00;
  font-size: 18px;
  text-shadow: 0 0 5px rgba(238, 0, 0, 0.5);
}

#oferta ul li strong {
  color: #2ecc71;
  text-shadow: 0 0 5px rgba(46, 204, 113, 0.3);
}

a {
  color: #fff;
  text-decoration: underline;
}

/* ============================
   LINKI KONTAKTOWE
============================ */
.mail-link,
.fb-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: 24px;
  transition: color 0.3s, text-shadow 0.3s, transform 0.3s;
}

.mail-link i,
.fb-link i {
  font-size: 20px;
  color: #fff;
  transition: color 0.3s, text-shadow 0.3s;
}

.mail-link:hover,
.fb-link:hover {
  color: #e00;
  text-shadow: 0 0 8px #e00;
  transform: translateX(3px);
}

.mail-link:hover i,
.fb-link:hover i {
  color: #e00;
  text-shadow: 0 0 8px #e00;
}

/* ============================
   PRZYCISKI JĘZYKA
============================ */
.lang-switch-li {
    list-style: none;
}

.lang-switch-container {
    display: flex;
    gap: 5px;
    align-items: center;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 8px rgba(255, 0, 0, 0);
  transition: color 0.3s, box-shadow 0.3s, transform 0.3s, background-color 0.3s;
}

.lang-switch:hover {
  color: #e00;
  background-color: rgba(0, 0, 0, 0.8);
  box-shadow: 0 0 10px #e00, 0 0 20px #e00 inset;
  transform: translateY(-2px);
}

.lang-switch img {
  width: 22px;
  height: auto;
  border-radius: 3px;
}

/* ============================
   GALERIA ZDJĘĆ I WIDEO
============================ */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.gallery img,
.gallery video {
  width: 100%;
  border-radius: 10px;
  border: 2px solid rgba(255, 0, 0, 0.4);
  transition: transform 0.3s, box-shadow 0.3s;
}

.gallery img:hover,
.gallery video:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px #e00;
}

/* ============================
   LIGHTBOX DLA ZDJĘĆ I WIDEO
============================ */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 5000;
  overflow: auto;
  padding-top: 40px;
}

.lightbox img,
.lightbox video {
  max-width: 95%;
  max-height: 80%;
  border-radius: 10px;
  border: 2px solid #e00;
  box-shadow: 0 0 20px #e00;
}

.lightbox .close {
  position: absolute;
  top: 100px;
  right: 40px;
  font-size: 50px;
  color: #fff;
  cursor: pointer;
  text-shadow: 0 0 10px #e00;
  transition: 0.3s;
}

.lightbox .close:hover {
  color: #e00;
  text-shadow: 0 0 20px #e00;
}

/* ============================
   KKL Kombajn Section & Refinements
============================ */
.icon-check {
    color: #00ff00;
}

.kkl-intro {
    text-align: left;
    margin-bottom: 20px;
    font-style: italic;
    opacity: 0.9;
}

.kkl-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    text-align: left;
}

.kkl-card {
    flex: 1;
    min-width: 280px;
    background: rgba(255,255,255,0.05);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
}

.kkl-card-title {
    margin-top: 0;
    color: #2ecc71;
}

.kkl-card-list {
    list-style: none;
    padding: 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.kkl-screenshots-container {
    margin-top: 20px;
}

.kkl-screenshots-title {
    font-size: 1.5rem;
    text-align: center;
    color: #2ecc71;
    border-bottom: 2px solid #e00;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.kkl-gallery {
    justify-content: center;
}

.kkl-gallery-img {
    border: 2px solid #2ecc71;
    max-width: 100%;
    height: auto;
}

.kkl-license-box {
    margin-top: 20px;
    text-align: left;
    padding: 15px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
}

.kkl-license-text {
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.kkl-license-text .fa-circle-info {
    color: #2ecc71;
}

.kkl-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.kkl-btn {
    text-decoration: none;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.kkl-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: all 0.6s;
    z-index: -1;
}

.kkl-btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(39, 174, 96, 0.4);
}

.kkl-btn:hover::before {
    left: 100%;
}

.kkl-btn:active {
    transform: translateY(-2px) scale(0.98);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.kkl-btn-download {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    border: 1px solid rgba(255,255,255,0.1);
}

.kkl-btn-license {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(5px);
}

.kkl-btn-license:hover {
    background: rgba(255,255,255,0.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 255, 255, 0.2);
}

/* Lightbox Navigation */
.lightbox-prev, .lightbox-next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: 50px;
  height: 50px;
  margin-top: -25px;
  color: white;
  font-weight: bold;
  font-size: 24px;
  transition: all 0.3s ease;
  user-select: none;
  -webkit-user-select: none;
  z-index: 5001;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(5px);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-decoration: none;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-prev:hover, .lightbox-next:hover {
  background-color: rgba(238, 0, 0, 0.6);
  border-color: #e00;
  box-shadow: 0 0 15px #e00;
  transform: scale(1.1);
}

.lightbox-prev:active, .lightbox-next:active {
  transform: scale(0.95);
}

/* Lightbox Image Fade-in Animation */
#lightbox-img.fade-in {
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Loading Spinner */
.spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 8px solid rgba(255, 255, 255, 0.2);
    border-top: 8px solid #e00;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    display: none; /* Hidden by default */
    z-index: 5002;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Lightbox Video Fade-in Animation */
#lightbox-video.fade-in {
    animation: fadeIn 0.5s;
}

/* ============================
   RESPONSYWNOŚĆ (MOBILE)
============================ */
@media (max-width: 850px) {
    body {
        padding-top: 50px; /* Powrót do paddingu dla fixed */
    }

    /* Hamburger Menu */
    .menu-toggle {
        display: block;
        position: absolute;
        top: 50%;
        left: 10px;
        transform: translateY(-50%);
        color: #fff;
        font-size: 24px;
        cursor: pointer;
        z-index: 2001;
    }

    .top-nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: rgba(0, 0, 0, 0.95);
        position: absolute;
        top: 50px;
        left: 0;
        padding: 0;
        gap: 0;
        height: auto;
        z-index: 2000;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .top-nav ul.show {
        display: flex;
    }

    .top-nav ul li {
        text-align: center;
        padding: 8px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .top-nav ul li:last-child {
        border-bottom: none;
    }

    .top-nav a {
        font-size: 16px;
    }
    
    /* Główne menu - Poprawka na nachodzenie */
    .top-nav {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: auto !important;
        height: 50px;
        padding: 0;
        justify-content: flex-start;
        z-index: 99999;
        background-color: #000000; /* Całkowicie czarne tło dla stabilności */
        backdrop-filter: none;
        transform: none !important;
        transition: none !important;
        border-bottom: 1px solid rgba(255, 0, 0, 0.3);
    }

    /* Kontener przełącznika w menu mobilnym */
    .lang-switch-container {
        justify-content: center;
        padding: 5px 0;
    }
    .lang-switch {
        padding: 6px 10px;
        font-size: 12px;
    }
    .lang-switch img {
        width: 18px;
    }

    /* Poprawki ogólnego layoutu na mobilce */
    .hero {
        padding: 10px;
    }
    .hero-content {
        gap: 15px;
        padding-top: 50px;
    }
    .hero-text h1, .info-box h2 {
        font-size: 20px;
    }
    .hero-text p, ul {
        font-size: 15px;
    }
    ul {
        padding-left: 25px;
    }
    .info-box {
        padding: 15px;
        border-radius: 0;
    }

    /* Galeria - 2 kolumny */
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
    }

    /* Sekcja KKL */
    .kkl-card {
        min-width: 100%;
    }
    .kkl-card-list {
        font-size: 0.85rem;
    }
    .kkl-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    .kkl-btn {
        justify-content: center;
    }

    /* Lightbox */
    .lightbox .close {
        top: 80px; /* Przeniesione wyżej na mobilce */
        right: 20px;
        font-size: 40px;
    }

    .lightbox-prev, .lightbox-next {
        top: auto !important;
        bottom: 50px !important; /* Podniesione o kolejne 10px */
        margin-top: 0 !important;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .lightbox-prev {
        left: calc(50% - 60px) !important; /* Wyśrodkowanie - lewy */
        right: auto !important;
    }

    .lightbox-next {
        left: calc(50% + 10px) !important; /* Wyśrodkowanie - prawy */
        right: auto !important;
    }

    /* Mobile Dropdown Adjustments */
    .top-nav li.dropdown {
        padding-bottom: 0; /* Remove extra padding on mobile */
        margin-bottom: 0;
        display: flex;
        flex-direction: column;
    }

    .top-nav .dropdown-menu {
        position: static; /* Stack naturally in the list */
        transform: none;
        background-color: transparent;
        border: none;
        box-shadow: none;
        width: 100%;
        min-width: auto;
        padding: 0;
        margin: 0;
        display: flex; /* Always visible on mobile */
        flex-direction: column;
    }
    
    .top-nav li.dropdown:hover .dropdown-menu {
        display: flex;
    }

    /* Disable click on "Kontakt" in mobile, style as header */
    .top-nav li.dropdown > .dropdown-toggle {
        pointer-events: none;
        color: #2ecc71; /* Highlight like other headers */
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
        display: block;
    }

    .top-nav .dropdown-menu .dropdown-item {
        font-size: 16px;
        padding: 10px 0; /* Adjust padding */
        justify-content: center;
        background-color: rgba(255, 255, 255, 0.03); /* Subtle differentiation */
        margin-bottom: 2px;
    }

    /* Specific override for KKL (leave as is on mobile) */
    .top-nav li.pc-only-dropdown {
        display: block;
    }
    .top-nav li.pc-only-dropdown .dropdown-menu {
        display: none !important;
    }
    .top-nav li.pc-only-dropdown > .dropdown-toggle {
        pointer-events: auto !important;
        color: #fff !important;
        border-bottom: none !important;
    }
}