/* Global Styles */
:root {
    --primary-color: #ff8c00;
    --secondary-color: #333;
    --light-gray: #f5f5f5;
    --dark-gray: #666;
    --white: #fff;
    --black: #000;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--secondary-color);
}

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

section {
    padding: 80px 0;
}

h1, h2, h3 {
    margin-bottom: 20px;
    font-weight: 700;
}

h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 4px;
    background-color: var(--primary-color);
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

ul {
    list-style: none;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 25px;
    border-radius: 30px;
    transition: all 0.3s ease;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo img {
    height: 50px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--secondary-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 5px;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), #222;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--white);
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            45deg,
            rgba(255, 140, 0, 0.05),
            rgba(255, 140, 0, 0.05) 10px,
            rgba(0, 0, 0, 0) 10px,
            rgba(0, 0, 0, 0) 20px
        ),
        radial-gradient(
            circle at 50% 50%,
            rgba(255, 140, 0, 0.1),
            transparent 40%
        ),
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.3),
            rgba(0, 0, 0, 0.1),
            rgba(0, 0, 0, 0.3)
        );
    z-index: 1;
}

.hero::after {
    content: '{code}';
    position: absolute;
    font-family: monospace;
    font-size: 20vw;
    color: rgba(255, 255, 255, 0.03);
    bottom: -10%;
    right: 5%;
    transform: rotate(-10deg);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 40px;
}

/* About Section */
.about-section {
    background-color: var(--light-gray);
}

.about-content {
    display: flex;
    gap: 50px;
}

.about-text, .about-info {
    flex: 1;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.info-box {
    background-color: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.info-box h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.info-box ul li {
    margin-bottom: 10px;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.project-card {
    background-color: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    text-align: center;
}

.project-card:hover {
    transform: translateY(-10px);
}

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

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* Contact Section */
.contact-section {
    background-color: var(--light-gray);
}

.contact-content {
    display: flex;
    gap: 50px;
}

.contact-info, .contact-form {
    flex: 1;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 20px 0;
    text-align: center;
}

/* Error Page */
.error-page {
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.error-content {
    max-width: 600px;
}

.error-logo {
    height: 80px;
    margin-bottom: 30px;
}

.error-page h1 {
    font-size: 8rem;
    color: var(--primary-color);
    margin-bottom: 0;
}

.error-page h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.error-page p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .navbar .container {
        height: 70px;
    }
    
    .nav-links {
        position: absolute;
        right: 0;
        top: 70px;
        background-color: var(--white);
        width: 100%;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        transform: translateX(100%);
        transition: transform 0.5s ease;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links.active {
        transform: translateX(0);
    }
    
    .burger {
        display: block;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    .about-content, .contact-content {
        flex-direction: column;
    }
}

.offers-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    z-index: 1;
}

.offers-intro {
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
}

.seo-text {
    color: #666;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem;
    position: relative;
    z-index: 2;
}

.offer-category {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    z-index: 3;
    isolation: isolate; /* Tworzy nowy kontekst stackingowy */
}

.offer-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    z-index: 4;
}

.offer-items {
    display: grid;
    gap: 1.5rem;
    position: relative;
}

.offer-item {
    position: relative;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 5;
    /* Usunięcie conflictujących transform z animacji */
    transform: translateZ(0); /* Wymusza hardware acceleration bez konfliktu */
}

.offer-item:hover {
    background: #007bff;
    color: white;
    transform: translateZ(0) scale(1.03); /* Zachowuje bazowy transform */
    z-index: 6;
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.offer-item i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #007bff;
    transition: color 0.3s ease;
    display: block; /* Zapobiega problemom z inline elementami */
}

.offer-item:hover i {
    color: white;
}

.offer-item h4 {
    margin: 0.5rem 0;
    font-size: 1.2rem;
    position: relative;
    z-index: 1;
}

.offer-item p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
    position: relative;
    z-index: 1;
}

/* Poprawiona animacja - bez konfliktu z hover */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateZ(0) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateZ(0) translateY(0);
    }
}

.offer-item {
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: calc(var(--item-index) * 0.1s);
    /* Zapewnia, że po animacji element ma właściwy stan */
    animation-fill-mode: both;
}

/* Dodatkowe zabezpieczenie przed overflow */
.offers-section * {
    box-sizing: border-box;
}

/* Responsive design adjustments */
@media (max-width: 768px) {
    .offers-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0.5rem;
    }
    
    .offer-category {
        margin-bottom: 1.5rem;
    }
    
    .offer-item:hover {
        transform: translateZ(0) scale(1.02); /* Mniejsze scale na mobile */
    }
}

/* Dodatkowe zabezpieczenie dla bardzo małych ekranów */
@media (max-width: 480px) {
    .offers-grid {
        gap: 1rem;
    }
    
    .offer-category {
        padding: 1.5rem;
    }
    
    .offer-item {
        padding: 1.25rem;
    }
}
.download-link {
    color: inherit;
    text-decoration: none;
    display: block;
    height: 100%;
    transition: all 0.3s ease;
}

.download-link:hover {
    color: var(--primary-color);
}

.stat-card .download-link p {
    font-size: 0.9rem;
    margin-top: 0.5rem;
    color: var(--dark-gray);
}

.school-card .download-link:hover h4 {
    color: var(--primary-color);
} 