
:root {
    --bg-dark: #020205;
    --miedz: #b87333;
    --cyjan: #00f2ff;
    --text-light: #e0e0e0;
    --glass: rgba(255, 255, 255, 0.03);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: 'Rajdhani', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Tło kosmiczne */
.space-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #111 0%, #020205 100%);
    z-index: -1;
}

/* Nawigacja */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background: rgba(2, 2, 5, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(184, 115, 51, 0.3);
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    color: var(--miedz);
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    margin-left: 30px;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
    transition: 0.3s;
}

.nav-links a:hover {
    color: var(--cyjan);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 10vw, 5rem);
    letter-spacing: 10px;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(0, 188, 212, 0.7);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--miedz);
    letter-spacing: 5px;
}

.miedz-line {
    width: 200px;
    height: 2px;
    background: var(--miedz);
    margin: 20px auto;
}

.cta-button {
    display: inline-block;
    padding: 15px 35px;
    border: 1px solid var(--cyjan);
    color: var(--cyjan);
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    margin-top: 0px;
    transition: 0.4s;
}

.cta-button:hover {
    background: var(--cyjan);
    color: #000;
    box-shadow: 0 0 20px var(--cyjan);
}

/* Kontenery i Sekcje */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    color: var(--cyjan);
    margin-bottom: 50px;
    text-align: center;
    text-transform: uppercase;
}

section {
    padding: 100px 0;
}

/* Grid kart */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--glass);
    padding: 40px;
    border: 1px solid rgba(184, 115, 51, 0.2);
    text-align: center;
    transition: 0.4s;
}

.card:hover {
    border-color: var(--cyjan);
    transform: translateY(-10px);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

/* Galeria */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.gallery-item {
    position: relative;
    height: 300px;
    overflow: hidden;
    border: 1px solid rgba(184, 115, 51, 0.3);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 242, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.5s;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Kontakt */
.contact-box {
    text-align: center;
    background: var(--glass);
    padding: 40px 20px;
    /* Zmniejszony padding boczny dla telefonów */
    border: 1px solid var(--miedz);
    word-wrap: break-word;
    /* Wymusza łamanie długich słów */
    overflow-wrap: break-word;
    max-width: 100%;
}

.email {
    font-size: clamp(1.1rem, 4vw, 1.8rem);
    /* Inteligentne skalowanie czcionki */
    color: var(--cyjan);
    text-decoration: none;
    display: block;
    /* E-mail jako osobny blok ułatwia łamanie */
    margin: 20px 0;
    transition: 0.3s;
}

.email:hover {
    color: var(--miedz);
    text-shadow: 0 0 10px var(--miedz);
}

.location {
    font-size: 1rem;
    letter-spacing: 2px;
    color: var(--text-light);
}

/* Dodatkowe zabezpieczenie dla bardzo małych ekranów */
@media (max-width: 480px) {
    .contact-box {
        padding: 30px 10px;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .navbar {
        padding: 20px;
    }

    .nav-links {
        display: none;
    }
}

/* LIGHTBOX STYLE */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(2, 2, 5, 0.95);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80%;
    border: 1px solid var(--miedz);
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.2);
}

.close,
.prev,
.next {
    position: absolute;
    color: var(--cyjan);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    transition: 0.3s;
}

.close {
    top: 30px;
    right: 40px;
}

.prev {
    left: 30px;
}

.next {
    right: 30px;
}

.close:hover,
.prev:hover,
.next:hover {
    color: var(--miedz);
}

#caption {
    position: absolute;
    bottom: 50px;
    color: var(--text-light);
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 2px;
}

/* --- KWANTOWA GEOMETRIA W TLE --- */
.quantum-geometry {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    z-index: -1; /* Figura jest pod tekstem */
    display: flex;
    justify-content: center;
    align-items: center;
}

.quantum-geometry .circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1px solid var(--cyjan);
    border-radius: 38% 62% 63% 37% / 41% 44% 56% 59%; /* Organiczny kształt */
    transition: 0.5s;
    animation: quantum-rotate 10s linear infinite;
    opacity: 0.3;
}

/* Druga warstwa figury - miedziana */
.quantum-geometry .circle:nth-child(2) {
    width: 80%;
    height: 80%;
    border-color: var(--miedz);
    animation-duration: 15s;
    animation-direction: reverse;
    opacity: 0.5;
}

/* Trzecia warstwa - pulsujące jądro */
.quantum-geometry .circle:nth-child(3) {
    width: 50%;
    height: 50%;
    border-color: #fff;
    animation-duration: 7s;
    opacity: 0.2;
    filter: blur(2px);
}

@keyframes quantum-rotate {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.1);
        border-radius: 63% 37% 37% 63% / 59% 56% 44% 41%;
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

/* Efekt poświaty wokół figury */
.quantum-geometry::after {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(0, 242, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

/* Responsywność dla telefonów */
@media (max-width: 768px) {
    .quantum-geometry {
        width: 250px;
        height: 250px;
    }
}

/* --- ANIMOWANE TŁO KOSMICZNE (ENERGIA ORGONU) --- */
.space-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #19194a 0%, #020205 100%);
    z-index: -1;
    overflow: hidden;
}

/* Warstwa 1: Miedziany pył */
.space-background::before {
    content: "";
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image: 
        radial-gradient(1px 1px at 20px 30px, #b87333, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 40px 70px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 90px 40px, #b87333, rgba(0,0,0,0));
    background-size: 200px 200px;
    animation: rotate-space 70s linear infinite;
    opacity: 0.3;
}

/* Warstwa 2: Błękitna energia (Cyjan) */
.space-background::after {
    content: "";
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image: 
        radial-gradient(1.5px 1.5px at 100px 150px, #00f2ff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 200px 50px, #fff, rgba(0,0,0,0));
    background-size: 300px 300px;
    animation: rotate-space 150s linear infinite reverse;
    opacity: 0.2;
}

@keyframes rotate-space {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Efekt "mgławicy" w tle */
.space-background .nebula {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(0, 242, 255, 0.05), transparent 100%);
    filter: blur(50px);
    animation: pulse-nebula 10s ease-in-out infinite alternate;
}

@keyframes pulse-nebula {
    from { opacity: 0.2; transform: scale(1); }
    to { opacity: 0.5; transform: scale(1.2); }
}

footer {
    text-align: center;
    padding: 50px;
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #666;
}

/* --- STYLIZACJA TŁUMACZA --- */
#google_translate_element {
    margin-left: 20px;
    padding: 5px;
}

/* Ukrycie paska Google na górze strony po tłumaczeniu */
.goog-te-banner-frame.skiptranslate {
    display: none !important;
}
body {
    top: 0px !important;
}

/* Dopasowanie dla telefonów */
@media (max-width: 768px) {
    #google_translate_element {
        margin-left: 0;
        margin-top: 10px;
    }
    .navbar {
        flex-direction: column; /* Układa logo i tłumacz pionowo na mobile */
        height: auto;
        padding: 10px;
    }
}

.lang-switch {
    display: flex;
    gap: 10px;
    margin-left: 20px;
}

.lang-switch button {
    background: none;
    border: 1px solid transparent;
    color: #666;
    font-family: 'Orbitron';
    font-size: 0.75rem;
    cursor: pointer;
    padding: 2px 5px;
    transition: 0.3s;
}

.lang-switch button.active {
    color: var(--cyjan);
    border-color: rgba(0, 242, 255, 0.3);
    text-shadow: 0 0 5px var(--cyjan);
}

.lang-switch button:hover {
    color: var(--miedz);
}

a[href^="tel:"] {
    text-decoration: none;
    color: inherit;
    /* Sprawia, że numer ma taki sam kolor jak reszta tekstu */
}

.social-icons {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 25px;
}

.social-icons a {
    color: var(--text-light);
    font-size: 1.8rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    display: inline-block;
}

/* Efekt najechania - ikona zmienia kolor na miedziany i lekko "skacze" */
.social-icons a:hover {
    color: var(--miedz);
    transform: translateY(-5px) scale(1.2);
    filter: drop-shadow(0 0 8px var(--miedz));
}

/* Opcjonalnie: ikona YouTube może świecić na czerwono, a Instagram na fioletowo */
.social-icons a:hover .fa-youtube { color: #ff0000; filter: drop-shadow(0 0 8px #ff0000); }
.social-icons a:hover .fa-instagram { color: #e1306c; filter: drop-shadow(0 0 8px #e1306c); }
.social-icons a:hover .fa-facebook-f { color: #1877f2; filter: drop-shadow(0 0 8px #1877f2); }

.hero-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.yt-dynamic-button {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 25px;
    background: rgba(255, 0, 0, 0.1); /* Delikatna czerwień YouTube */
    border: 1px solid #ff0000;
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    transition: all 0.4s ease;
    overflow: hidden;
}

.yt-dynamic-button:hover {
    background: #ff0000;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.6);
    transform: scale(1.05);
}

.yt-icon {
    font-size: 1.2rem;
    color: #ff0000;
    transition: 0.3s;
}

.yt-dynamic-button:hover .yt-icon {
    color: #fff;
}

/* Efekt pulsującej energii wokół przycisku */
.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50px;
    border: 1px solid rgba(255, 0, 0, 0.5);
    animation: yt-pulse 2s infinite;
    pointer-events: none;
}

@keyframes yt-pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0;
    }
}

/* Responsywność */
@media (max-width: 768px) {
    .hero-actions {
        flex-direction: column;
        gap: 15px;
    }
}

/* Wymuszenie stylów dla kart jako linków */
section#projekty .cards-grid a.card {
    display: flex !important;
    text-decoration: none !important;
    color: var(--text-light) !important;
    background: var(--glass) !important;
    cursor: pointer !important;
    transition: all 0.4s ease !important;
    flex-direction: column;
    padding: 40px;
    border: 1px solid rgba(184, 115, 51, 0.2);
    text-align: center;
}

section#projekty .cards-grid a.card:hover {
    transform: translateY(-10px) !important;
    border-color: var(--cyjan) !important;
    background: rgba(0, 242, 255, 0.05) !important;
}

.dynamic-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  padding: 20px;
}

.gallery-card {
  background: #fff; /* Tło okienka */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  
  /* Stan początkowy: ukryte, małe i obrócone */
  opacity: 0;
  transform: scale(0.8) translateY(40px);
  transition: all 0.7s cubic-bezier(0.34, 1.56, 0.64, 1); /* Efekt sprężyny */
}

/* Klasa aktywowana przez JS */
.gallery-card.is-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.image-wrapper img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

/* Dodatkowy efekt: powiększenie zdjęcia po najechaniu na okienko */
.gallery-card:hover img {
  transform: scale(1.08);
}