/* === STYLIZACJA POJEDYNCZEJ STRONY REALIZACJI (CASE STUDY) === */

/* --- ANIMACJE (Dla elementów wchodzących na ekran) --- */
@keyframes elegantFadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- ANIMACJE TŁA (Ciągłe falowanie linii) --- */
@keyframes floatLine1 {
    0% {
        transform: translateY(-15px) rotate(-3deg) scale(1.1);
    }
    50% {
        transform: translateY(0px) rotate(0deg) scale(1.15);
    }
    100% {
        transform: translateY(15px) rotate(3deg) scale(1.1);
    }
}

@keyframes floatLine2 {
    0% {
        transform: translateY(10px) rotate(3deg) scale(1.2);
    }
    50% {
        transform: translateY(-5px) rotate(-1deg) scale(1.25);
    }
    100% {
        transform: translateY(15px) rotate(2deg) scale(1.2);
    }
}

/* --- KLASY DO ANIMACJI PRZEWIJANIA --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Nadpisanie Hero dla konkretnego zdjęcia */
.single-hero {
    background-image: url('img/samonosne/1/1.jpg');
    background-position: center center;
    height: 40vh; 
    min-height: 300px;
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 175px;
}

/* Animacja dla napisów w Hero */
.single-hero .page-title {
    opacity: 0;
    animation: elegantFadeUp 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 0.2s;
}

.single-hero .page-subtitle {
    opacity: 0;
    animation: elegantFadeUp 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 0.4s;
}

/* --- SEKCJA GÓRNA: ZDJĘCIE + SPECYFIKACJA --- */
.specs-section {
    padding: 60px 20px 40px;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.spec-visual {
    position: relative;
    display: flex;
    justify-content: center;
}

.featured-img {
    width: auto;
    max-width: 100%;
    max-height: 600px; 
    object-fit: contain;
    border: 1px solid var(--border-color);
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    filter: grayscale(10%);
    
    cursor: pointer;
    transition: filter 0.4s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}

.featured-img:hover { 
    filter: grayscale(0%);
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(186, 162, 86, 0.15);
}

/* --- SEKCJA OPISU --- */
.description-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    text-align: center;
    position: relative;
}

/* Kontener tekstu */
.project-desc {
    position: relative;
    z-index: 2; /* Tekst nad liniami */
    padding: 20px;
}

/* Kontener dla animowanych linii SVG */
.deco-container {
    position: absolute;
    top: -20%;
    left: 50%; /* Centrowanie względem rodzica */
    transform: translateX(-50%); /* Precyzyjne wyśrodkowanie */
    
    /* ZMIANA: Szerokość na cały ekran */
    width: 100vw; 
    height: 140%; /* Większa wysokość, by ładnie wypełniało tło */
    
    z-index: 1; /* Pod tekstem */
    pointer-events: none;
    overflow: hidden;
    opacity: 0.6; /* Subtelna widoczność */
}

/* Styl linii SVG */
.deco-line {
    fill: none;
    stroke: var(--color-gold);
    stroke-width: 1.5px;
    vector-effect: non-scaling-stroke;
    opacity: 0.3;
}

/* Pierwsza spirala/linia */
.deco-line-1 {
    transform-origin: center center;
    /* ZMIANA: Przyspieszona animacja (15s -> 10s) */
    animation: floatLine1 10s ease-in-out infinite alternate;
}

/* Druga spirala/linia */
.deco-line-2 {
    stroke-width: 1px;
    opacity: 0.2;
    transform-origin: center center;
    /* ZMIANA: Przyspieszona animacja (20s -> 14s) */
    animation: floatLine2 14s ease-in-out infinite alternate;
}

.project-desc h2 {
    font-family: var(--font-headers);
    color: var(--color-gold);
    font-size: 36px;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
    text-shadow: 0 4px 10px rgba(0,0,0,0.8);
}

.project-desc h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background-color: var(--color-gold);
    margin: 10px auto 0;
}

.project-desc p {
    font-family: var(--font-main);
    color: #dcdcdc;
    line-height: 1.9;
    font-size: 18px;
    margin-bottom: 20px;
    text-align: justify;
    text-align-last: center;
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
}

/* Prawa kolumna - Karta Techniczna */
.tech-card {
    background-color: rgba(20, 18, 16, 0.8);
    border: 1px solid var(--color-gold);
    padding: 30px;
    position: relative;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: fit-content;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tech-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}

.tech-title {
    color: var(--color-gold);
    font-family: var(--font-headers);
    font-size: 24px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--color-gold);
    padding-bottom: 10px;
}

.tech-card::before, .tech-card::after {
    content: '';
    position: absolute;
    width: 20px; height: 20px;
    border-color: var(--color-gold);
    border-style: solid;
    transition: all 0.3s;
}
.tech-card::before { top: -1px; left: -1px; border-width: 3px 0 0 3px; }
.tech-card::after { bottom: -1px; right: -1px; border-width: 0 3px 3px 0; }

.tech-header {
    font-family: 'myFirstFont', serif;
    color: rgba(255,255,255,0.05);
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 60px;
    pointer-events: none;
}

.spec-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #404040;
    padding: 15px 0;
    font-family: var(--font-main);
}
.spec-item:last-child { border-bottom: none; }

.spec-label {
    color: var(--color-grey);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
}

.spec-value {
    color: var(--color-gold);
    font-weight: bold;
    text-align: right;
    font-size: 16px;
}

/* --- GALERIA PROJEKTU --- */
.project-gallery {
    padding: 40px 20px 80px;
    max-width: 1400px;
    margin: 0 auto;
    border-top: 1px solid #333;
}

.gallery-title {
    color: #fff;
    font-family: var(--font-headers);
    font-size: 28px;
    margin-bottom: 30px;
    border-left: 3px solid var(--color-gold);
    padding-left: 15px;
}

.gallery-grid-single {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border: 1px solid #333;
    cursor: pointer;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    filter: grayscale(20%);
}

.gallery-item:hover img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

/* Nawigacja między projektami */
.project-nav {
    border-top: 1px solid #333;
    padding: 40px 20px;
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}
.nav-btn {
    color: var(--color-text);
    text-decoration: none;
    font-family: var(--font-headers);
    font-size: 18px;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-btn:hover { color: var(--color-gold); }

@media screen and (max-width: 900px) {
    .specs-section { grid-template-columns: 1fr; }
    .single-hero { height: 40vh; }
    .description-section { padding: 20px; }
    .project-desc p { text-align: left; text-align-last: left; }
}

/* STYLIZACJA SEKCJI FAQ (Najczęściej Zadawane Pytania) */

.faq-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    color: #dcdcdc;
    font-family: var(--font-main);
}

.faq-section h2 {
    font-family: var(--font-headers);
    color: var(--color-gold);
    font-size: 32px;
    margin-bottom: 50px;
    text-align: center;
}

.faq-item {
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(186, 162, 86, 0.2);
    padding-bottom: 20px;
}

.faq-item:last-child { 
    border-bottom: none; 
}

.faq-question {
    font-family: var(--font-headers);
    color: #fff;
    font-size: 20px;
    margin-bottom: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
}

.faq-question:hover { 
    color: var(--color-gold); 
}

.faq-answer {
    font-size: 16px;
    line-height: 1.6;
    display: none; /* Domyślnie ukryte, obsługiwane przez JS */
    color: #ccc;
    padding-top: 10px;
}

/* Klasa aktywna dodawana przez JS */
.faq-item.active .faq-answer { 
    display: block; 
    animation: fadeIn 0.5s; 
}

.faq-icon { 
    transition: transform 0.3s ease; 
}

.faq-item.active .faq-icon { 
    transform: rotate(180deg); 
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}