/* === PODSTAWY === */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }
html { scroll-behavior: smooth; }
body { overflow-x: hidden; background-color: white; }

/* Sekcja Realizacje - karty */
.realizacja-card {
    background-color: white; 
    border-radius: 15px;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, padding 0.4s ease;
    cursor: pointer; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
    user-select: none; /* Zapobiega zaznaczaniu tekstu przy szybkim klikaniu */
}

/* Stan AKTYWNY (po kliknięciu) */
.realizacja-card.active-card { 
    transform: scale(1.08) !important; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.3); 
    z-index: 10; 
    padding-bottom: 25px;
}

/* Tytuł w karcie */
.card-title {
    font-weight: 700; 
    color: #000099;
    transition: margin 0.3s ease;
}

/* Dodatkowy tekst - domyślnie ukryty */
.card-extra-text {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.4s ease, margin-top 0.4s ease;
    font-size: 0.85rem;
    color: #333;
    text-align: center;
    padding: 0 15px;
    line-height: 1.4;
}

/* Pokazywanie tekstu w stanie aktywnym */
.realizacja-card.active-card .card-extra-text {
    max-height: 120px; 
    opacity: 1;
    margin-top: 10px;
}

/* Styl przycisku galeria */
.gallery-btn-container { margin-top: 50px; text-align: center; }
.gallery-btn {
    display: inline-block; background-color: white; color: #000099;
    padding: 15px 45px; font-size: 1.1rem; font-weight: 900;
    text-decoration: none; border-radius: 50px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.gallery-btn:hover { transform: scale(1.1); box-shadow: 0 8px 25px rgba(0,0,0,0.3); }

/* Animacje Reveal */
.animate-reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s ease-out; }
.animate-reveal.active { opacity: 1; transform: translateY(0); }

/* === KOMPUTER (Powyżej 768px) === */
@media (min-width: 769px) {
    header { background-color: #000099; height: 80px; display: flex; align-items: center; position: fixed; width: 100%; z-index: 1000; }
    .navbar { display: flex; justify-content: center; align-items: center; width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 20px; }
    .nav-group.desktop-only { display: flex; gap: 35px; align-items: center; }
    .nav-left { margin-right: 45px; } 
    .nav-right { margin-left: 45px; }
    .nav-logo img { height: 60px; display: block; }
    .nav-link { color: white; text-decoration: none; font-weight: 700; font-size: 14px; text-transform: uppercase; display: flex; align-items: center; padding: 10px 0; }
    .nav-header-icon { height: 20px; margin-right: 10px; }
    .menu-toggle, .mobile-menu { display: none; }
    .about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; max-width: 1200px; margin: 0 auto; }
    .realizacje-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; max-width: 1200px; margin: 0 auto; }
    .realizacja-card { padding: 35px 25px; min-height: 200px; }
    .realizacja-card img { height: 75px; margin-bottom: 15px; }
    .realizacja-card p { font-size: 1.1rem; }
}

/* === TELEFON (Do 768px) === */
@media (max-width: 768px) {
    header { background-color: #000099; height: 70px; position: fixed; width: 100%; z-index: 1000; display: flex; align-items: center; }
    .navbar { width: 100%; display: flex; align-items: center; padding: 0 20px; position: relative; }
    .nav-logo { position: absolute; left: 50%; transform: translateX(-50%); }
    .nav-logo img { height: 45px; }
    .desktop-only { display: none; }
    .menu-toggle { display: flex; flex-direction: column; gap: 6px; background: none; border: none; cursor: pointer; z-index: 1100; }
    .menu-toggle span { width: 25px; height: 3px; background: white; transition: 0.3s; }
    .menu-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
    .mobile-menu {
        position: fixed; top: 70px; left: -100%; width: 100%; background: #000099;
        display: flex; flex-direction: column; align-items: center; gap: 25px; padding: 40px 0;
        transition: 0.4s ease-in-out; border-top: 1px solid rgba(255,255,255,0.1);
    }
    .mobile-menu.active { left: 0; }
    .mobile-menu .nav-link { color: white; text-decoration: none; font-size: 1.1rem; font-weight: 700; text-transform: uppercase; }
    .realizacje-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0 15px; }
    .realizacja-card { padding: 20px 10px; min-height: 140px; }
    .realizacja-card img { height: 35px; margin-bottom: 8px; }
    .realizacja-card p { font-size: 0.75rem; font-weight: 800; color: #000099; text-transform: uppercase; }
    .card-extra-text { font-size: 0.65rem; padding: 0 5px; }
    .about-grid { grid-template-columns: 1fr; gap: 30px; padding: 0 20px; }
    .gallery-btn { padding: 12px 35px; font-size: 0.9rem; }
}

/* RESZTA STYLI */
.hero { height: 100vh; position: relative; overflow: hidden; background: #000; }
.hero-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.6); z-index: 5; }
.slide { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(8px); opacity: 0; animation: fadeSlider 15s infinite; }
.slide:nth-child(1) { animation-delay: 0s; } .slide:nth-child(2) { animation-delay: 5s; } .slide:nth-child(3) { animation-delay: 10s; }
@keyframes fadeSlider { 0%, 100% { opacity: 0; } 10%, 33% { opacity: 1; } 43% { opacity: 0; } }
.hero-content { position: absolute; top: 55%; left: 50%; transform: translate(-50%, -50%); text-align: center; color: white; z-index: 10; width: 100%; }
.hero-logo-small { max-width: 100px; margin-bottom: 20px; opacity: 0; }
.hero-text-small { text-transform: uppercase; opacity: 0; letter-spacing: 2px; }
.about-new { padding: 60px 0; text-align: center; }
.about-header { display: flex; align-items: center; justify-content: center; gap: 15px; margin-bottom: 50px; }
.about-header img { height: 40px; }
.about-header h2 { color: #000099; font-size: 2rem; font-weight: 900; }
.about-card img { height: 60px; margin-bottom: 15px; }
.about-card p { color: #000099; font-weight: 600; padding: 0 20px; }
.realizacje { background: #000099; padding: 60px 0; }
.wave-container { line-height: 0; background: #000099; width: 100%; }
.wave-container svg { height: 60px; width: 100%; }
.wave-flipped { transform: scaleY(-1); }
.form-container { max-width: 400px; margin: 0 auto; padding: 0 20px; }
.quote-form { background: #000099; padding: 30px; border-radius: 20px; text-align: left; }
.form-group { margin-bottom: 15px; }
.form-group label { display: flex; align-items: center; color: white; font-size: 0.75rem; margin-bottom: 5px; font-weight: 700; }
.form-icon { height: 14px; margin-right: 8px; }
.form-group input, .form-group textarea { width: 100%; padding: 10px; border-radius: 8px; border: none; outline: none; }
.form-submit { width: 100%; background: white; color: #000099; padding: 12px; border: none; border-radius: 50px; font-weight: 900; cursor: pointer; }
.contact-section { background: #000099; padding: 50px 20px; color: white; text-align: center; }
.contact-logo-row { display: flex; align-items: center; justify-content: center; gap: 15px; margin-bottom: 30px; }
.contact-main-logo { height: 60px; }
.contact-brand-name { font-size: 1.8rem; font-weight: 900; }
.contact-item { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 15px; }
.contact-item img { height: 20px; }
.contact-item a { color: white; text-decoration: none; }
.animate-pop-in { animation: popIn 1s forwards; }
.animate-slide-up { animation: slideUp 0.8s forwards 0.5s; }
@keyframes popIn { 0% { opacity: 0; transform: scale(0.5); } 100% { opacity: 1; transform: scale(1); } }
@keyframes slideUp { 0% { opacity: 0; transform: translateY(20px); } 100% { opacity: 1; transform: translateY(0); } }