/*  ZMIENNE I RESET */
:root {
    --bg-color: #f4f4f4;
    --text-color: #fff;
    --accent-color: hsl(310, 76%, 72%);
    --gray: #ccc;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background-color: #000;
    color: var(--text-color);
    overflow-x: hidden;
}

/* TŁO DYNAMICZNE  */
.dynamic-bg {
    position: fixed !important;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -1 !important;
    background-image: url('../images/milka1.JPG'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 0.8s ease-in-out;
    display: block !important;
}

/*  NAWIGACJA */
nav {
    position: fixed;
    top: 0; width: 100%;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(239, 129, 213, 0.8); 
    backdrop-filter: blur(10px);
}

.logo { font-weight: 700; font-size: 1.2rem; text-transform: uppercase; cursor: pointer; }

.nav-links a { 
    margin-left: 20px; 
    text-decoration: none; 
    color: var(--text-color); 
    font-size: 0.8rem; 
    text-transform: uppercase;
    font-weight: 700;
    transition: color 0.3s;
}
.nav-links a:hover { color: var(--accent-color); }

/* SEKCJE - OGÓLNE */
section { 
    height: 100vh; 
    width: 100%;
    padding: 80px 10%; 
    position: relative; 
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center;    
    background: rgba(0, 0, 0, 0.4); 
    backdrop-filter: blur(2px);
    overflow: hidden; 
}
/* Wyjątek dla pierwszej sekcji (Hero) */
.hero { 
    background: transparent; 
    backdrop-filter: none;
}

.hero-title { font-size: clamp(3rem, 10vw, 8rem); line-height: 0.9; font-weight: 800; text-transform: uppercase; }
.hero-title span { display: block; overflow: hidden; }
.hero-title span i { display: block; font-style: normal; } 
.hero-sub { margin-top: 20px; font-size: 1.2rem; opacity: 1; }

/*  OSIĄGNIĘCIA */
.lista-osiagniec { margin-top: 50px; border-top: 1px solid rgba(255,255,255,0.2); }

.work-item { 
    padding: 30px 0; 
    border-bottom: 1px solid rgba(255,255,255,0.2); 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    cursor: pointer;
    transition: padding 0.3s;
}
.work-item:hover { padding: 30px 20px; }
.work-item h2 { font-size: clamp(1.5rem, 4vw, 3rem) !important; text-transform: uppercase; line-height: 1.2; }
.work-item .year { font-size: 1.2rem; color: var(--gray); }

/* O MNIE */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; margin-top: 50px; }
.stats { display: flex; gap: 40px; }
.stat-item h3 { font-size: 3rem; color: var(--accent-color); }
.about-text { font-size: 1.5rem; line-height: 1.4; }

/*  KONTAKT I IKONY */
.contact { background: rgba(0, 0, 0, 0.8) !important; text-align: center; }
.contact h1 { font-size: clamp(2.5rem, 6vw, 5rem); text-transform: uppercase; margin-bottom: 30px; }
.contact-link { font-size: 2rem; color: var(--accent-color); text-decoration: none; font-weight: 700; }
.social-text {
    color: #fff;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-top: 60px;    
    margin-bottom: 1px; 
    opacity: 0.8;
}
.social-icons { display: flex; justify-content: center; gap: 30px; margin-top: 40px; }
.icon-link { font-size: 2.5rem; color: #fff; opacity: 0.6; transition: 0.3s; }
.icon-link:hover { opacity: 1; color: var(--accent-color); transform: translateY(-5px); }

.footer-bottom { margin-top: 50px; display: flex; justify-content: space-between; color: var(--gray); font-size: 0.8rem; }

/* EFEKT HOVER IMAGE (Desktop) */
.hover-img {
    position: fixed;
    width: 300px; height: 400px;
    pointer-events: none;
    opacity: 0;
    z-index: 10;
    transform: scale(0.8);
    transition: opacity 0.3s, transform 0.3s;
}
.hover-img img { width: 100%; height: 100%; object-fit: cover; }

/* WERSJA MOBILNA */
@media (max-width: 768px) {
    .dynamic-bg { background-attachment: scroll; }
    
    nav { padding: 15px 3%; flex-wrap: wrap; justify-content: center; gap: 10px; }
    .nav-links a { margin-left: 10px; font-size: 10px; }

    h1, .hero-title { font-size: 40px !important; text-align: center; }
    
    .about-grid, .stats { display: flex; flex-direction: column; gap: 30px; text-align: center; }
    .about-text { font-size: 1.1rem; }

    .work-item { flex-direction: column; align-items: flex-start; gap: 10px; }
    .work-item h2 { font-size: 22px !important; }

    section { padding: 80px 5% !important; min-height: auto; }
    
    .contact h1 { font-size: 32px !important; }
    .contact-link { font-size: 1.2rem; }
    section {
        height: 100vh !important; 
        padding: 60px 5% !important;
        justify-content: center;
    }

   
    .about-grid, .lista-osiagniec {
        width: 100%;
        margin-top: 20px;
    }

    .hero-title {
        font-size: 38px !important; 
    }
    
}
.details-section {
    /* Zamiast height: 100vh; używamy min-height */
    min-height: 100vh;
    height: auto !important; /* Pozwala sekcji się rozciągać */
    width: 100%;
    padding: 100px 10%; /* Większy padding góra/dół */
    display: none; /* JS to zmieni na flex */
    flex-direction: column;
    justify-content: flex-start; /* Treść zaczyna się od góry, nie od środka */
    align-items: center;
    background: rgba(0, 0, 0, 0.9) !important;
    position: relative;
    z-index: 5;
}

/* Dodaj to, żeby przycisk nie był przyklejony do dołu sekcji */
.details-container {
    width: 100%;
    max-width: 1000px;
    padding-bottom: 50px; /* Miejsce pod przyciskiem */
}

#details-title {
    font-size: clamp(2rem, 5vw, 4rem);
    text-transform: uppercase;
    margin-bottom: 20px;
}

#details-text {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--gray);
    margin-bottom: 40px;
}

.back-btn {
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 15px 30px;
    text-transform: uppercase;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.back-btn:hover {
    background: var(--accent-color);
    color: #000;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Automatyczne dopasowanie kolumn */
    gap: 20px;
    margin: 40px 0;
    width: 100%;
}

.gallery-item {
    width: 100%;
    height: 250px;
    object-fit: cover; /* Zdjęcia i filmy wypełnią ramkę bez rozciągania */
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.03);
    border-color: var(--accent-color);
}

/* Poprawka dla wideo, żeby nie wystawało */
video.gallery-item {
    background: #000;
}
@media (max-width: 768px) {
    /* Pozwalamy sekcjom rosnąć powyżej 100% ekranu, jeśli mają dużo treści */
    section {
        height: auto !important;
        min-height: 100vh;
        padding: 60px 5% !important;
        display: block; /* Zmiana z flex na block pomaga przy długich listach */
    }

    /* Szczegóły muszą wypychać resztę strony w dół */
    .details-section {
        display: none; /* Domyślnie schowane */
        position: relative;
        z-index: 1;
        overflow: visible;
    }

    .details-container {
        padding-bottom: 100px; /* Duży margines, żeby kontakt nie nachodził */
    }

    .gallery-grid {
        grid-template-columns: 1fr; /* Na telefonie zdjęcia jedno pod drugim */
        gap: 15px;
    }

    .gallery-item {
        height: auto; /* Nie wymuszamy wysokości na telefonie */
        max-height: 400px;
    }
}
