/* Zmienne CSS */
:root {
    --color-bg: #0f1115;
    --color-surface: #1c1f26;
    --color-text-main: #f0f0f0;
    --color-text-muted: #a0a5b0;
    --color-accent: #0088ff;
    --color-accent-hover: #0070cc;
    --font-main: system-ui, -apple-system, sans-serif;
    --transition-speed: 0.3s;
}

/* Reset CSS */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Nawigacja */
.site-header {
    background-color: var(--color-surface);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-main);
    letter-spacing: 1px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.main-nav a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.main-nav a:hover {
    color: var(--color-accent);
}

/* Przyciski i linki */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color var(--transition-speed);
}

.btn-primary {
    background-color: var(--color-accent);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
}

.btn-link {
    display: inline-block;
    margin-top: 15px;
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color var(--transition-speed);
}

.btn-link:hover {
    color: var(--color-accent-hover);
}

/* Sekcja Hero (Główna Strona) */
.hero {
    text-align: center;
    padding: 120px 20px;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    color: var(--color-text-muted);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto 40px auto;
}

/* Portfolio i Kategorie */
.portfolio {
    padding: 20px 20px 60px 20px;
}

.category-title {
    text-align: left;
    margin: 80px 0 30px 0;
    font-size: 1.8rem;
    color: var(--color-accent);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

/* Karty projektów */
.project-card {
    background-color: var(--color-surface);
    border-radius: 12px;
    overflow: hidden;
    transition: transform var(--transition-speed);
    border: 1px solid rgba(255,255,255,0.05);
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 136, 255, 0.3);
}

/* Globalny Model 3D */
model-viewer {
    width: 100%;
    height: 300px;
    background-color: #2a2e38;
    filter: brightness(0.9) contrast(1.15); 
}

.project-card figcaption {
    padding: 24px;
}

.project-card h3 {
    margin-bottom: 10px;
    font-size: 1.25rem;
}

.project-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* --- STYLE NOWEJ PODSTRONY PROJEKTU --- */
.back-link {
    margin: 40px 0 20px 0;
    display: inline-block;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.back-link:hover {
    color: var(--color-text-main);
}

.project-header {
    margin-bottom: 40px;
}

/* Sekcja z dużym modelem i specyfikacją boczną */
.project-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 20px;
}

@media (min-width: 1024px) {
    .project-hero-grid {
        grid-template-columns: 1.5fr 1fr;
    }
}

/* Duży Model 3D na podstronie */
.large-viewer {
    width: 100%;
    height: 600px; 
    background-color: #1a1d23;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Karta specyfikacji (Sidebar) */
.side-spec-card {
    background: var(--color-surface);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.side-spec-card h2 {
    font-size: 1.4rem;
    color: var(--color-accent);
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}

.tech-spec-list {
    list-style: none;
}

.tech-spec-list li {
    margin-bottom: 15px;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    display: flex;
    flex-direction: column;
}

.tech-spec-list li strong {
    color: var(--color-text-main);
    margin-bottom: 3px;
}

/* Sekcja opisu i rysunku technicznego pod modelem */
.project-content-section {
    margin-top: 60px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
}

@media (min-width: 1024px) {
    .project-content-section {
        grid-template-columns: 1fr 1fr;
    }
}

.drawing-container h2, .detailed-description h2 {
    margin-bottom: 20px;
    color: var(--color-accent);
    font-size: 1.4rem;
}

.drawing-container img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background-color: var(--color-surface);
}

.image-caption { 
    font-size: 0.8rem; 
    color: #666; 
    margin-top: 10px; 
    text-align: center; 
}

.detailed-description p {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    margin-bottom: 15px;
}

.detailed-description h3 {
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 1.15rem;
    color: var(--color-text-main);
}

/* --- NAPRAWIONE LISTY --- */
.detailed-description ul {
    list-style-position: outside; /* Kropka na zewnątrz bloku tekstu */
    padding-left: 20px; /* Zrobienie miejsca na kropkę */
    color: var(--color-text-muted);
}

.detailed-description li {
    margin-bottom: 8px;
    line-height: 1.6; /* Poprawia czytelność wielolinijkowych tekstów */
}

/* Uniwersalna naprawa dla wszystkich ewentualnych list na stronie */
ul {
    list-style-position: outside;
    padding-left: 20px;
}

/* --- GALERIA ZDJĘĆ --- */
.gallery-section {
    margin-top: 60px;
    background: var(--color-surface);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}

.gallery-title {
    font-size: 1.4rem;
    color: var(--color-accent);
    margin-bottom: 10px;
}

.gallery-desc {
    color: var(--color-text-muted);
    margin-bottom: 25px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
}

/* Stylizacja punktu (hotspotu) na modelu */
.hotspot-btn {
    background-color: var(--color-accent);
    color: #ffffff;
    border: 2px solid #ffffff;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.2s ease;
    transform: scale(0.8);
}

.hotspot-btn.visible {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hotspot-btn:hover {
    background-color: var(--color-accent-hover);
    transform: scale(1.05);
}

/* --- LIGHTBOX (Powiększanie zdjęć) --- */
.zoomable-image {
    cursor: zoom-in;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.zoomable-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.modal-lightbox {
    display: none; 
    position: fixed;
    z-index: 9999; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); 
    backdrop-filter: blur(5px); 
}

.modal-lightbox-content {
    margin: auto;
    display: block;
    max-width: 95%;
    max-height: 95vh;
    margin-top: 2.5vh;
    border-radius: 4px;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {transform: scale(0.9); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-lightbox:hover {
    color: var(--color-accent);
}

/* Stopka */
.site-footer {
    background-color: var(--color-surface);
    text-align: center;
    padding: 60px 20px;
    margin-top: 80px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.site-footer a {
    color: var(--color-accent);
    text-decoration: none;
}