:root {
    --primary-color: #ff8c00; /* Railway Orange */
    --secondary-color: #2c3e50; /* Dark Blue-Grey */
    --bg-dark: #121212;
    --bg-darker: #0a0a0a;
    --bg-card: #1c1c1c; /* Solid card bg */
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --white: #ffffff;
    --nav-bg: rgba(10, 10, 10, 0.98);
    --nav-height: 80px;
    --transition-speed: 0.3s;
}

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

html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
}

/* ZADANIE 1: Agresywne Skalowanie Desktopowe */
@media (min-width: 992px) {
    html {
        font-size: clamp(10px, 0.7vw, 18px); /* Agresywny clamp */
    }

    /* ZADANIE 2: Responsywne Logo */
    .logo img {
        width: 12vw;
        max-width: 180px;
        min-width: 100px; /* Żeby nie zniknęło */
        height: auto;
    }

    /* ZADANIE 3: Skalowanie marginesów w menu */
    .nav-links {
        gap: 0.5vw; /* Relatywny odstęp między elementami */
    }

    .nav-links a {
        padding: 10px 0.6vw; /* Padding zależny od szerokości */
    }

    /* ZADANIE 4: Kompaktowa sekcja kontaktowa */
    .nav-contact-extra {
        gap: 1em;
        margin-left: 1em;
    }

    .nav-contact-item {
        font-size: 0.9em;
        gap: 0.5em;
    }
    
    .nav-contact-item i {
        font-size: 1.2em;
    }
}

h1, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

h2, h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Utilities */
.text-primary {
    color: var(--primary-color) !important;
}

.text-white {
    color: var(--white) !important;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
    position: relative;
}

.bg-darker {
    background-color: var(--bg-darker);
}

.section-title {
    text-align: center;
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary-color);
}

.divider {
    height: 4px;
    width: 60px;
    background-color: var(--primary-color);
    margin: 10px 0 30px 0;
}

.center-divider {
    margin: 10px auto 50px auto;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition-speed);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #e67e00;
    transform: translateY(-2px);
}

/* --- NAVIGATION START --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background-color: var(--nav-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar .container {
    max-width: 98%;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    flex-wrap: nowrap;
}

.logo {
    flex-shrink: 0;
    margin-right: 20px;
}

.logo img {
    height: 65px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    flex-grow: 1;
    justify-content: center;
    align-items: center;
    height: 100%;
    gap: 15px;
    overflow: visible;
    flex-wrap: nowrap;
}

.nav-links a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    padding: 6px 5px;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
}

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

.nav-contact-extra {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    margin-left: 20px;
}

.nav-contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.nav-contact-item i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.nav-contact-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    text-align: left;
}

.nav-contact-label {
    font-size: 0.7rem;
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 700;
}

.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1002;
    margin-left: auto;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--white);
    transition: all 0.3s ease-in-out;
}

.mobile-contact-li {
    display: none;
}

@media (max-width: 1350px) {
    .nav-contact-label {
        display: none;
    }
    /* Usunięto sztywne style (padding, height, font-size), 
       aby zadziałało płynne skalowanie z definicji powyżej (min-width: 992px) */
}

@media (max-width: 992px) {
    .nav-contact-extra {
        display: none !important;
    }

    .hamburger {
        display: block;
    }

    .navbar .container {
        padding-right: 20px;
    }

    .nav-links {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        justify-content: flex-start;
        background-color: var(--bg-darker);
        width: 100%;
        height: 100vh;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        padding-top: 100px;
        margin: 0;
        gap: 0;
        overflow-y: auto;
        z-index: 1001;
    }

    .nav-links.active {
        left: 0;
        box-shadow: 5px 0 15px rgba(0,0,0,0.5);
    }

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .nav-links a {
        font-size: 1.1rem;
        padding: 20px 0;
        width: 100%;
        display: block;
        text-align: center;
    }

    .mobile-contact-li {
        display: block;
        margin-top: auto;
        padding: 30px 20px;
        background: rgba(255, 140, 0, 0.05);
        border-top: 2px solid var(--primary-color);
        width: 100%;
    }

    .mobile-contact-box {
        text-align: center;
        color: #ddd;
    }

    .mobile-contact-box p {
        margin: 10px 0;
        font-size: 1rem;
    }

    .mobile-contact-box i {
        color: var(--primary-color);
        margin-right: 10px;
    }
}
/* --- NAVIGATION END --- */

/* Hero Section */
.hero-section {
    height: 100vh;
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../assets/img/bg0.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: clamp(1.6rem, 7vw, 2.8rem);
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.handwritten {
    font-family: 'Dancing Script', cursive;
    color: var(--primary-color);
}

.hero-content p {
    font-size: clamp(1.1rem, 4vw, 2.2rem);
    margin-bottom: 40px;
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 800;
    text-shadow: 
        -1px -1px 0 #000,  
         1px -1px 0 #000,
        -1px  1px 0 #000,
         1px  1px 0 #000;
}

/* About Section */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

/* ZADANIE 2: Justowanie tekstu w sekcji O Nas */
.about-text p {
    text-align: justify;
    margin-bottom: 20px;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #d0d0d0;
}

/* Services / Trainings / Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background-color: var(--bg-card);
    padding: 40px 30px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
}

.card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* ZADANIE 3: Przywrócenie kafelków w Kursy Kolejowe (Desktop) */
.courses-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* Domyślne style dla treningów */
.trainings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.training-card ul {
    color: var(--white);
}

.training-card li {
    color: var(--white);
}

.training-card span:not(.text-primary) {
    color: var(--white);
}

/* Overlays for parallax sections */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 0;
}

.relative-content {
    position: relative;
    z-index: 1;
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
}

.form-row input {
    flex: 1 1 30%;
    min-width: 250px;
}

.contact-form input,
.contact-form textarea {
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 5px;
    font-family: inherit;
    width: 100%;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

/* Footer */
footer {
    background-color: #000;
    padding: 30px 0;
    text-align: center;
    color: var(--text-muted);
}

/* Mobile Adjustments for Content */
@media (max-width: 992px) {
    .about-container,
    .contact-wrapper,
    .trainings-grid,
    .courses-list {
        grid-template-columns: 1fr !important; /* Wymuś 1 kolumnę na mobile */
    }

    .form-row input {
        flex: 1 1 100%;
    }
}

/* Scroll to Top */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.scroll-to-top.visible {
    display: flex;
}