/* --- DESIGN SYSTEM --- */
:root {
    --bg-main: #1B1D20;
    --bg-card: #23262A;
    --accent: #FFC106;
    --text-main: #E0E0E0;
    --text-heading: #FFFFFF;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-heading);
    font-weight: 600;
}

.text-accent { color: var(--accent); }
.bg-accent { background-color: var(--accent); }
.bg-card { background-color: var(--bg-card); }

a { text-decoration: none; transition: 0.3s; }

/* --- NAWIGACJA (Glassmorphism) --- */
.navbar {
    background: rgba(27, 29, 32, 0.8) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}
.navbar-brand { font-weight: 700; color: var(--text-heading) !important; font-size: 1.5rem; }
.navbar-brand span { color: var(--accent); }
.nav-link { color: var(--text-main) !important; font-weight: 400; margin: 0 10px; }
.nav-link:hover { color: var(--accent) !important; }
.navbar-toggler { border-color: rgba(255,193,6,0.5); }
.navbar-toggler-icon { filter: invert(80%) sepia(80%) saturate(2000%) hue-rotate(350deg) brightness(100%); }

/* Poprawka rozwijanego menu dla mobile */
@media (max-width: 991px) {
    .navbar-collapse {
        background-color: var(--bg-card);
        padding: 15px;
        border-radius: 8px;
        margin-top: 15px;
        border: 1px solid rgba(255, 255, 255, 0.05);
    }
    .nav-link { margin: 5px 0; text-align: center; }
    .mobile-cta { display: block; width: 100%; text-align: center; margin-top: 15px; }
}

/* --- PRZYCISKI --- */
.btn-custom-primary {
    background-color: var(--accent);
    color: var(--bg-main);
    font-weight: 600;
    border: none;
    padding: 12px 28px;
    border-radius: 6px;
    transition: 0.3s;
    display: inline-block;
}
.btn-custom-primary:hover {
    background-color: #e0a800;
    color: var(--bg-main);
    transform: translateY(-2px);
}
.btn-custom-outline {
    background-color: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
    font-weight: 600;
    padding: 10px 28px;
    border-radius: 6px;
    transition: 0.3s;
    display: inline-block;
}
.btn-custom-outline:hover {
    background-color: var(--accent);
    color: var(--bg-main);
}

/* --- SEKCJE & RESPONSIVNESS --- */
section { padding: 100px 0; }
.section-title { margin-bottom: 50px; font-weight: 700; font-size: 2.5rem; }
.hero-title { font-size: 3.5rem; line-height: 1.2; }

@media (max-width: 767px) {
    section { padding: 60px 0; }
    .section-title { margin-bottom: 40px; font-size: 2rem; text-align: center; }
    .hero-title { font-size: 2.2rem; margin-top: 20px; }
    .hero-buttons { flex-direction: column; width: 100%; }
    .hero-buttons a { width: 100%; text-align: center; margin-bottom: 10px; }
}

/* Hero */
.hero-img {
    filter: drop-shadow(0 0 30px rgba(255, 193, 6, 0.2));
    animation: float 6s ease-in-out infinite;
    max-width: 100%;
}
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* Trust Bar */
.trust-bar {
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 30px 0;
}
.trust-item i { font-size: 24px; color: var(--accent); margin-right: 10px; }
.trust-item span { font-weight: 600; color: var(--text-heading); font-size: 1.2rem; }

/* Karty Usług */
.service-card {
    background-color: var(--bg-card);
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 30px;
    height: 100%;
    transition: all 0.3s ease;
}
.service-card:hover {
    border-color: var(--accent);
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}
.service-icon { font-size: 40px; color: var(--accent); margin-bottom: 20px; }

/* Portfolio */
.portfolio-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-card);
}
.portfolio-img { 
    width: 100%; 
    height: auto; 
    transition: 0.5s; 
    object-fit: cover;
    object-position: top;
}
.portfolio-item:hover .portfolio-img {
    /* Po najechaniu myszką pokaż dół zdjęcia */
    object-position: bottom; 
    /* Czas trwania "przewijania" */
    transition: 3s ease-in-out; 
}
.portfolio-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(27, 29, 32, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.4s;
}
.portfolio-item:hover .portfolio-overlay { 
    opacity: 1; 
}
.portfolio-item:hover .portfolio-img { 
    transform: scale(1.05); 
}

/* Mobile Portfolio Fallback (zawsze widoczny przycisk na telefonach) */
@media (max-width: 767px) {
    .portfolio-overlay { opacity: 1; background: rgba(27, 29, 32, 0.4); }
    .portfolio-overlay .btn-custom-primary { box-shadow: 0 4px 10px rgba(0,0,0,0.5); }
}

/* Proces (Timeline) - Mobile & Desktop */
.process-row { position: relative; }
.process-step { text-align: center; position: relative; z-index: 2; }
.step-number {
    width: 45px; height: 45px;
    background: var(--accent); color: var(--bg-main);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.2rem; margin: 0 auto 15px auto;
    position: relative; z-index: 3; box-shadow: 0 0 0 5px var(--bg-main);
}

/* Linia pozioma na PC */
@media (min-width: 768px) {
    .process-step::after {
        content: ''; position: absolute; top: 22px; left: 50%;
        width: 100%; height: 2px; background: rgba(255, 193, 6, 0.2); z-index: 1;
    }
    .process-step:last-child::after { display: none; }
}

/* Linia pionowa na Mobile */
@media (max-width: 767px) {
    .process-row::before {
        content: ''; position: absolute; top: 0; bottom: 0; left: 50%;
        width: 2px; background: rgba(255, 193, 6, 0.2); transform: translateX(-50%); z-index: 1;
    }
    .process-step { margin-bottom: 30px; }
    .process-step:last-child { margin-bottom: 0; }
}

/* Formularz Kontaktowy */
.form-control {
    background-color: var(--bg-main); 
    border: 1px solid #3d4147;
    color: var(--text-heading); 
    padding: 14px 15px;
}
.form-control:focus {
    background-color: var(--bg-main); 
    border-color: var(--accent);
    color: var(--text-heading); 
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 6, 0.25);
}
.form-control::placeholder { 
    color: white; 
    opacity: 0.5; 
}

/* Stopka */
footer { 
    background-color: #000000; 
    padding: 30px 0; 
    text-align: center; 
    color: white;
}
a {
    color: var(--text-main);
    text-decoration: none;
    transition: 0.3s;
}
/* Kontener o stałej, optymalnej szerokości */
#portfolio .container {
    max-width: 1140px; 
}

/* Każdy element portfolio ma identyczne wymiary */
.portfolio-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-card);
    /* Ustawiamy proporcje 4:3 - klasyczny, elegancki format */
    aspect-ratio: 4 / 3; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s ease;
}

/* Portfolio info - mniejsze, zgrabniejsze napisy */
.portfolio-info {
    padding-top: 12px;
}

.portfolio-info h6 {
    font-size: 1.1rem;
    margin-bottom: 2px;
    color: var(--text-heading);
}

.portfolio-info span {
    font-size: 0.85rem;
    color: var(--accent);
    opacity: 0.8;
}
@media (min-width: 768px) { footer { text-align: left; } }
.social-links a { color: var(--text-main); font-size: 22px; margin: 0 10px; transition: 0.3s; }
.social-links a:hover { color: var(--accent); }

.code-animation-container {
    background-color: var(--bg-card);
    padding: 20px;
    border-radius: 10px;
    overflow-y: auto;      /* scroll wewnętrzny, jeśli kod jest dłuższy */
    max-height: 200px;     /* maksymalna wysokość kontenera */
    height: 200px;          /* stała wysokość, aby zawsze było miejsce na animację */
    margin: 30px auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    position: relative;
    color: var(--accent);
}

#code-animation code {
    white-space: pre-wrap;
    display: inline;
}

/* Migający kursorek */
#code-animation::after {
    content: '|';
    display: inline-block;
    margin-left: 2px;
    animation: blink 1s steps(1) infinite;
    color: var(--accent);
}

@keyframes blink {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0; }
}

/* Ukrycie znaczka reCAPTCHA */
.grecaptcha-badge { 
    visibility: hidden !important; 
}