:root {
    --color-primary: #00bcd4; /* Turkus (jasny) */
    --color-secondary: #8e24aa; /* Fiolet (głęboki) */
    --color-background: #0d0d1e; /* Bardzo ciemny granat */
    --color-text-light: #f0f0f0;
    --color-text-dark: #333;
    --color-accent: #ff4081; /* Akcent */
    --gradient-hero: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
}

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

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--color-text-light);
    background-color: var(--color-background);
    line-height: 1.6;
    overflow-x: hidden; /* Zapobieganie poziomemu scrollowaniu */
}

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

/* --- NAGŁÓWEK --- */

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background-color: rgba(13, 13, 30, 0.9); /* Półprzezroczysty */
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.logo {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--color-text-light);
}

.quanetra-logo-icon {
    color: var(--color-primary);
}

.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav ul li a {
    text-decoration: none;
    color: var(--color-text-light);
    margin-left: 25px;
    transition: color 0.3s, background-color 0.3s;
    padding: 5px 10px;
    border-radius: 5px;
}

.main-nav ul li a:hover {
    color: var(--color-primary);
    background-color: rgba(0, 188, 212, 0.1);
}

/* --- SEKCJE OGÓLNE --- */

section {
    padding: 100px 5%;
    text-align: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    font-size: 2.5em;
    margin-bottom: 50px;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(0, 188, 212, 0.5), transparent);
    margin: 0;
}

/* --- SEKCJA HERO I FRAKTAL (MODYFIKACJE) --- */

.hero-section {
    position: relative;
    padding-top: 120px;
    /* ZMIANA: Usunięto 'overflow: hidden;' */ 
}

/* Nowy element tła obrazkowego */
.image-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Najniższy poziom */
    background-image: url('tlo.png'); /* ZMIEŃ NA RZECZYWISTĄ NAZWĘ PLIKU */
    background-size: cover;
    background-position: center;
    
    /* Overlay z gradientem dla zachowania kolorystyki i przyciemnienia */
    &::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        /* Łączenie kolorów primary/secondary z ciemnym tłem */
        background: linear-gradient(
            to bottom, 
            rgba(13, 13, 30, 0.7) 0%, /* Górna część ciemniejsza */
            rgba(0, 188, 212, 0.2) 50%, /* Środek z turkusem/fioletem */
            rgba(142, 36, 170, 0.2) 75%,
            rgba(13, 13, 30, 0.9) 100% /* Dolna część mocno ciemna */
        );
        mix-blend-mode: multiply; /* Mieszanie z obrazem */
        opacity: 0.9;
    }
}

.fractal-background {
    position: absolute;
    top: -150px; 
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4; 
    opacity: 0.7;
}

.hero-content {
    position: relative;
    z-index: 3; /* Najwyższy poziom dla tekstu i przycisku */
    padding: 50px 0;
    min-height: 100vh; /* Zapewnienie, że treść jest wyśrodkowana na 100vh */
}

.hero-content h1 {
    font-size: 4em;
    margin-bottom: 10px;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    
    /* Poprawa czytelności dla nagłówka */
    text-shadow: 0 0 10px rgba(0, 188, 212, 0.8), 0 0 20px rgba(142, 36, 170, 0.5);
}

.hero-content .subtitle {
    font-size: 1.2em;
    color: rgba(255, 255, 255, 0.95); /* Zwiększona jasność */
    margin-bottom: 40px;
    
    /* Poprawa czytelności dla podtytułu */
    text-shadow: 0 0 5px var(--color-background), 0 0 10px var(--color-background);
}

.cta-button {
    text-decoration: none;
    background: var(--gradient-hero);
    padding: 15px 30px;
    border-radius: 50px;
    color: var(--color-text-light);
    font-weight: 700;
    letter-spacing: 1px;
    transition: transform 0.3s, box-shadow 0.3s;
    display: inline-block;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(142, 36, 170, 0.4);
}

/* --- SEKCJA O MNIE --- */

.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
    text-align: left;
    align-items: center;
}

.about-text p {
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.85);
}

.about-image {
    background-color: #222;
    height: 500px;
    width: 500px;
    border-radius: 10px;
    /* Placeholder dla zdjęcia */
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--color-primary);
    font-size: 1.2em;
    border: 3px solid var(--color-primary);
    overflow: hidden;
}

/* --- SEKCJA PORTFOLIO --- */

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

.project-card {
    background-color: #1a1a33;
    padding: 20px;
    border-radius: 10px;
    text-align: left;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(0, 188, 212, 0.2);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 188, 212, 0.3);
}

.project-card img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 15px;
}

.project-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 700;
    margin-top: 10px;
    display: inline-block;
}

/* --- SEKCJA USŁUGI --- */

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-item {
    background-color: #1a1a33;
    padding: 30px;
    border-radius: 10px;
    transition: background-color 0.3s;
}

.service-item:hover {
    background-color: #252545;
}

.service-icon {
    font-size: 2.5em;
    color: var(--color-primary);
    margin-bottom: 15px;
}

/* --- SEKCJA KONTAKT --- */

.contact-form {
    max-width: 600px;
    margin: 0 auto 30px;
    text-align: left;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: #1a1a33;
    color: var(--color-text-light);
    border-radius: 5px;
    transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--color-primary);
    outline: none;
}

.social-links a {
    color: var(--color-text-light);
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--color-primary);
}

/* --- STOPKA --- */

.main-footer {
    padding: 30px 5%;
    text-align: center;
    border-top: 1px solid rgba(0, 188, 212, 0.1);
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.5);
}

.main-header .site-logo {
    height: 50px; /* Ustawienie stałej wysokości dla nagłówka */
    width: auto; /* Szerokość dostosuje się automatycznie, zachowując proporcje */
    vertical-align: middle; /* Wyrównanie w pionie */
}

/* Opcjonalnie: dla urządzeń mobilnych można je nieco zmniejszyć */
@media (max-width: 768px) {
    .main-header .site-logo {
        height: 40px;
    }
}