:root {
  --bg: #0f0f0f;
  --text: #f5f5f5;
  --accent: #c59d5f;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
.back
{
    position: absolute;
    top: 5px;
    left: 5px;
    text-decoration: none;
    color: gold;
}
/* ===== HEADER ===== */
header {
  height: 100vh;
  background: /*url("https://images.unsplash.com/photo-1526170375885-4d8ecf77b99f")*/ url("/img/IMG_4566.jpg") center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.header-second
{
  height: 50vh;
  background: /*url("https://images.unsplash.com/photo-1526170375885-4d8ecf77b99f")*/ url("/img/IMG_4566.jpg") center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
header h1 {
  font-size: 4rem;
  animation: fadeIn 2s ease;
}

header p {
  color: var(--accent);
  letter-spacing: 3px;
}

/* ===== SEKCJA ===== */
section {
  padding: 80px 10%;
}

h2 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2.5rem;
}

/* ===== GALERIA ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
/* jeśli tylko jeden obrazek */
.gallery.single-image {
  display: flex;
  justify-content: center;
}

.gallery.single-image img {
  width: auto;
  max-width: 80%; /* dopasowanie do szerokości ekranu */
  max-height: 40vh;
  height: auto;   /* usuwa wymuszone 100% */
  object-fit: contain;
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.5s ease, filter 0.5s ease;
}

.gallery img:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
}

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  animation: zoomIn 0.4s ease;
}

.lightbox span {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 2rem;
  cursor: pointer;
}

/* ===== STOPKA ===== */
footer {
  text-align: center;
  padding: 40px;
  font-size: 0.9rem;
  color: #aaa;
}

/* ===== ANIMACJE ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes zoomIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ===== RESPONSYWNOŚĆ ===== */
@media(max-width: 768px) {
  header h1 {
    font-size: 2.5rem;
  }
}


.gallery-previews {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 20px;
}

.gallery-card {
  width: 300px;
  height: 200px;
  perspective: 1000px; /* pozwala na efekt 3D */
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.gallery-card:hover .card-inner {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 10px;
  overflow: hidden;
}

.card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-back {
  background: rgba(0,0,0,0.8);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: rotateY(180deg);
  font-size: 1.5em;
  text-align: center;
  padding: 10px;
}

.description {
  max-width: 900px;
  margin: 40px auto;
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text);
}

.description p {
  padding: 0 20px;
}

@media(max-width: 768px) {
  .description {
    font-size: 1rem;
    padding: 0 10px;
  }
}


/* ===== KONTAINER ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ===== POJEDYNCZY WPIS ===== */
.portfolio-entry {
    background: #1a1a1a;
    padding: 20px;
    margin-bottom: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-entry:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.7);
}

/* ===== TYTUŁ ===== */
.project-title {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 10px;
}

/* ===== ROLE / ODCINEK ===== */
.role, .episode, .notes, .links, .private {
    margin-bottom: 10px;
    color: var(--text);
}

.notes p {
    margin-bottom: 8px;
}

/* ===== LINKI ===== */
.links a {
    color: var(--accent);
    text-decoration: none;
    margin-right: 10px;
    transition: color 0.3s ease;
}

.links a:hover {
    color: #fff;
}

/* ===== GALERIA ===== */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
    filter: brightness(1.2);
}

.gallery-item .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.6);
    color: var(--text);
    font-size: 0.9rem;
    padding: 8px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .caption {
    opacity: 1;
}

/* ===== WPIS PRYWATNY ===== */
.private {
    font-style: italic;
    color: #c59d5f;
}

/* ===== RESPONSYWNOŚĆ ===== */
@media(max-width: 768px) {
    .project-title {
        font-size: 1.5rem;
    }

    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .notes, .role, .episode {
        font-size: 0.95rem;
    }
}


footer {
    background: #111; /* ciemniejsze tło niż body dla kontrastu */
    color: var(--text);
    padding: 40px 20px;
    text-align: center;
    font-size: 0.9rem;
    border-top: 2px solid var(--accent);
}

footer .social-widget {
    margin-bottom: 20px;
}

footer .social-widget h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--accent);
}

footer .social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

footer .social-links .social-btn {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 5px;
    background: rgba(197, 157, 95, 0.1);
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s ease, color 0.3s ease;
}

footer .social-links .social-btn:hover {
    background: var(--accent);
    color: var(--bg);
}

footer p {
    margin-top: 20px;
    color: #aaa;
}

.video-more {
    text-align: center;
  margin-top: 20px;
}

.video-btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease;
}

.video-btn:hover {
  background: #a37d4c;
}

.gallery-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.6);
  color: var(--accent);
  font-size: 1.5rem;
  padding: 5px 8px;
  border-radius: 50%;
  pointer-events: none; /* nie blokuje kliknięcia */
  transition: transform 0.3s ease;
}

.card-front:hover .gallery-icon {
  transform: scale(1.2);
}

.about-image
{
    width: 70%;
  height: 100%;
  object-fit: cover;
  display: block;
  max-width: 1000px;
  margin: auto;
  border-radius: 32px;
}