
:root {
    --primary-color: #ff1010; 
    --primary-hover: #ee1e1e;
    --bg-dark: #121212;
    --bg-darker: #0a0a0a;
    --text-light: #f5f5f5;
    --text-muted: #aaaaaa;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html, body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    
    /* Rygorystyczna blokada poziomego przewijania */
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    scroll-behavior: smooth;
}

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


h1, h2, h3 { font-weight: 700; margin-bottom: 15px; }
p { margin-bottom: 15px; color: var(--text-muted); }
.highlight { color: var(--primary-color); }
.section-padding { padding: 100px 0; }
.bg-darker { background-color: var(--bg-darker); }

.section-title {
    text-align: center;
    margin-bottom: 60px;
}
.section-title h2 {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
}
.section-title h2::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 3px;
    background: var(--primary-color);
    bottom: -10px;
    left: 25%;
}


.btn-primary {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 10px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 87, 34, 0.4);
}
.btn-large {
    padding: 15px 35px;
    font-size: 1.1rem;
}


.navbar {
    position: fixed;
    top: 0; left: 0; width: 100%;
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid #333;
    transition: var(--transition);
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}
.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: 1px;
}
.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    margin-left: 25px;
    font-weight: 500;
    transition: var(--transition);
}
.nav-links a:not(.btn-primary):hover {
    color: var(--primary-color);
}
.hamburger {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-light);
}


.hero {
    height: 100vh;
    background: url('https://images.unsplash.com/photo-1615906655593-ad0386982a0f?auto=format&fit=crop&q=80&w=1920') center/cover;
    position: relative;
    display: flex;
    align-items: center;
}
.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 100%);
}
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
}
.hero h1 { font-size: 3.5rem; line-height: 1.2; margin-bottom: 20px; }
.hero p { font-size: 1.2rem; color: #ddd; margin-bottom: 30px; }


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

/* --- Zoptymalizowana lista punktowana (Features) --- */
.features { 
    list-style: none; 
    margin-top: 25px; 
}

.features li {
    display: flex;
    align-items: flex-start; /* ZMIANA: wyrównanie do góry, nie do środka */
    margin-bottom: 15px;
    line-height: 1.5;
}

.features i { 
    color: var(--primary-color); 
    margin-right: 15px; 
    margin-top: 5px; /* Opuszcza ikonę idealnie do pierwszej linijki tekstu */
    min-width: 25px; /* Sztywna szerokość ikony, by nie kurczyła się na telefonie */
    text-align: center;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    border: 3px solid #333;
}


.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}
.service-card {
    background: #1e1e1e;
    padding: 40px 30px;
    border-radius: 10px;
    text-align: center;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
}
.service-card:hover {
    transform: translateY(-10px);
    border-bottom: 3px solid var(--primary-color);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
}
.service-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}


.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center; /* Wyśrodkowanie karuzeli */
}

.cert-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 20px 0;
    
    /* Ukrywanie paska przewijania */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.cert-carousel::-webkit-scrollbar {
    display: none;
}

/* GŁÓWNA ZMIANA: Sztywna szerokość karty */
.cert-carousel .cert-card.normal {
    width: 280px; /* Sztywna szerokość karty */
    max-width: 280px; /* Maksymalna szerokość karty */
    flex-shrink: 0;
    scroll-snap-align: center; /* Lepiej wygląda przy przewijaniu małych kart */
    background: #1e1e1e;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center; /* Wyśrodkowanie zawartości (zdjęcia) */
    transition: var(--transition);
    border: 1px solid transparent;
}

.cert-carousel .cert-card.normal:hover {
    border-color: #333;
    transform: translateY(-5px);
}

/* Poprawa zdjęcia w karuzeli */
.cert-carousel .cert-card.normal img {
    width: 100%; /* Zajmuje całą szerokość karty */
    height: 180px; /* Sztywna wysokość dla zdjęcia w karuzeli */
    object-fit: contain; /* ZMIANA: Zdjęcie nie rozciąga się, widać całe w ramce */
    background: #000; /* Czane tło dla zdjęcia, jeśli nie wypełnia ramki */
    display: block;
    cursor: zoom-in;
    border-bottom: 1px solid #333;
}

/* Poprawa tytułu w karuzeli */
.cert-carousel .cert-card.normal h3 {
    padding: 15px;
    font-size: 0.95rem; /* Nieco mniejsza czcionka dla lepszego dopasowania */
    text-align: center;
    margin: 0;
    line-height: 1.4;
    color: var(--text-light);
    width: 100%;
    word-wrap: break-word; /* Zawijanie długich słów */
}

/* Przyciski strzałek (bez zmian) */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: var(--primary-hover);
}

.prev-btn { left: -10px; } /* Nieco bliżej kontenera */
.next-btn { right: -10px; }

/* --- Responsywność dla karuzeli (Mobile) --- */
@media (max-width: 768px) {
    .carousel-btn {
        display: none; /* Ukrycie strzałek na telefonach */
    }
    .cert-carousel .cert-card.normal {
        width: 240px; /* Jeszcze mniejsze karty na telefonach */
        max-width: 240px;
        scroll-snap-align: start; /* Standardowe wyrównanie dla dotyku */
    }
    .cert-carousel .cert-card.normal img {
        height: 150px; /* Niższe zdjęcia na telefonach */
    }
}

.cert-card {
    background: #1e1e1e;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    transition: var(--transition);
}
.cert-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.cert-card h3 { padding: 15px 20px 5px; font-size: 1.1rem; }
.cert-card p { padding: 0 20px 20px; font-size: 0.9rem; margin: 0; }


.cert-card:hover img { transform: scale(1.05); }


.cert-card.highlighted {
    grid-column: 1 / -1; 
    display: flex;
    background: linear-gradient(145deg, #1e1e1e, #2a2a2a);
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 25px rgba(255, 87, 34, 0.2);
}
.cert-card.highlighted img { width: 50%; height: auto; object-fit: cover; }

.cert-card.highlighted .cert-badge {
    position: absolute;
    top: 20px; 
    left: -10px;
    right: auto;
    
    background: var(--primary-color);
    color: #fff;

    padding: 8px 20px; 
    
    transform: none; 
    
    font-weight: bold;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    
    box-shadow: 4px 4px 10px rgba(0,0,0,0.3); 
    z-index: 10;
    
    border-radius: 0 5px 5px 0; 
}
.cert-card.highlighted h3 { font-size: 1.8rem; padding: 30px 30px 10px; color: var(--primary-color); }
.cert-card.highlighted p { padding: 0 30px 30px; font-size: 1rem; }


.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}
.gallery-item {
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}
.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.5s ease;
    filter: grayscale(50%);
}
.gallery-item:hover img {
    transform: scale(1.1);
    filter: grayscale(0%);
}


.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
}
.info-item {
    display: flex;
    margin-bottom: 30px;
}
.info-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 20px;
    margin-top: 5px;
}
.info-item h4 { margin-bottom: 5px; }

.contact-map {
    width: 100%;
    min-height: 350px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    border: 2px solid #333;
    transition: var(--transition);
}

.contact-map:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px rgba(255, 87, 34, 0.2);
}

.contact-map iframe {
    display: block;
    width: 100%;
    height: 100%;
}

footer {
    background: #000;
    padding: 40px 0;
    font-size: 0.9rem;
    border-top: 1px solid #222;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.footer-content p {
    margin: 0;
    color: var(--text-muted);
}

.author-credit {
    font-size: 0.8rem;
    opacity: 0.8;
}

.author-credit a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.author-credit a:hover {
    color: #fff;
    text-decoration: underline;
}


.academy {
    background: linear-gradient(135deg, var(--bg-darker) 0%, #171717 100%);
    border-top: 1px solid #222;
    border-bottom: 1px solid #222;
}

.academy-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.badge {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(255, 87, 34, 0.3);
}

.academy-image {
    position: relative;
}

.academy-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: -20px 20px 0px rgba(255, 87, 34, 0.15); 
    border: 1px solid #333;
}

.academy-features {
    list-style: none;
    margin: 30px 0;
}

.academy-features li {
    display: flex;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid transparent;
    transition: var(--transition);
}

.academy-features li:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #333;
    transform: translateX(10px); 
}

.academy-features i {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-right: 20px;
    margin-top: 5px;
    min-width: 35px;
    text-align: center;
}

.academy-features h4 {
    margin-bottom: 5px;
    font-size: 1.1rem;
    color: var(--text-light);
}

.academy-features p {
    margin-bottom: 0;
    font-size: 0.9rem;
}


.cert-card img {
    cursor: zoom-in; 
}


.modal {
    display: none; 
    position: fixed;
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 5px;
    box-shadow: 0 0 40px rgba(255, 87, 34, 0.2);
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.modal.active .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 2001;
}

.close-modal:hover {
    color: var(--primary-color);
    transform: scale(1.2);
}

.animate-on-scroll {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, visibility;
}
.animate-on-scroll.is-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}


.fade-up { transform: translateY(40px); }
.slide-left { transform: translateX(-50px); }
.slide-right { transform: translateX(50px); }
.pop-in { transform: scale(0.9); }


@media (max-width: 992px) {
    .cert-card.highlighted { flex-direction: column; }
    .cert-card.highlighted img { width: 100%; height: 250px; }
    .contact-grid, .about-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.5rem; }
    .cert-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
    .contact-map { min-height: 300px; }

    .academy-container {
        grid-template-columns: 1fr;
        gap: 30px; 
    }
    
    .academy-image {
        order: 1; 
        margin-top: 0;
        margin-bottom: 10px;
    }
    
    .academy-image img {
        width: 100%;
        height: 300px;
        object-fit: cover;
        box-shadow: -10px 10px 0px rgba(255, 87, 34, 0.15); 
    }
    
    .academy-content {
        order: 2; 
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 80px;
        right: -100%;
        background: rgba(18, 18, 18, 0.98);
        width: 100%;
        height: calc(100vh - 80px);
        flex-direction: column;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: right 0.4s ease;
    }
    .nav-links.active { right: 0; }
    .nav-links a { margin: 20px 0; font-size: 1.2rem; }
    .hamburger { display: block; }
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
    }
}

@media (max-width: 576px) {
    .academy-image img {
        height: 220px;
        box-shadow: none; 
        border: 2px solid #333;
    }

    .features li {
        font-size: 0.95rem; 
    }
    .features i {
        font-size: 1.1rem;
    }
}