/* Blokada scrolla tła */
body.menu-open {
    overflow: hidden;
    position: fixed;
    /* Kluczowe dla iOS */
    width: 100%;
    height: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-muted);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: ease 100ms all;
}

#logo {
    transition: ease 100ms all;

}

.logo {
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: 0.08em;
    color: var(--primary);
}

nav a {
    margin-left: 1.5rem;
    font-weight: 500;
    color: var(--text-muted);
}

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

section {
    padding: 6rem 2rem;
    max-width: 1500px;
    margin: 0 auto;
}

.hero {
    text-align: center;
    padding-top: 8rem;
    background: linear-gradient(180deg, var(--bg-light), var(--bg));
    max-width: 100% !important;
    margin: 0;
}

.hero span {
    color: var(--primary);
    font-weight: 800;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    margin-bottom: 1.5rem;
}

.hero p {
    max-width: 820px;
    margin: 0 auto 3rem;
    color: var(--text-muted);
    font-size: 1.15rem;
}

.cta {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 1rem 2.4rem;
    border-radius: 999px;
    font-weight: 600;
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}

.cta:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .15);
}

.section-title {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-title h2 {
    font-size: 2.4rem;
    margin-bottom: 1rem;
}

.section-title p {
    color: var(--text-muted);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2.5rem;
    justify-content: center;
}

.card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(120deg, var(--bg-light), var(--bg-dark));
    border: 1px solid var(--border-muted);
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    transition: transform .3s ease, box-shadow .3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 450px !important;
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
}

.card h3 {
    margin-bottom: .75rem;
    color: var(--primary);
    font-size: 32px;
}

.card p {
    color: var(--text-muted);
    font-size: 16px;
}

.about {
    background: var(--primary);
    border-radius: 3rem;
    color: white;
    max-width: 100%;
    margin: 0 20px;
    padding: 10rem 40px;
    overflow: hidden;
}

.about .section-title p {
    color: white;
}

.background-video video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -1;
    transform: translate(-50%, -50%);
    filter: blur(2px);
    opacity: 0.03;
}

#process {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.process {
    display: grid;
    gap: 3rem;
    width: fit-content;
}

.step {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.step span {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

footer {
    background: var(--bg-light);
    border-top: 1px solid var(--border-muted);
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-muted);
}

/* animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity .8s ease, transform .8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.flex {
    display: flex;
    flex-direction: row;
    gap: 20px;
    width: max-content;
}

.timeline-container {
    position: relative;
    max-width: 800px;
    margin: 50px auto;
    padding: 20px 0;
}

.timeline-line {
    position: absolute;
    left: 30px;
    top: 50px;
    bottom: 50px;
    width: 2px;
    background: #e0e0e0;
    z-index: 1;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    padding-left: 80px;
    z-index: 2;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 0;
    width: 60px;
    height: 60px;
    background: #fff;
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    z-index: 3;
    transition: all 0.3s ease;
}

.reveal .timeline-item .timeline-dot {
    background: var(--primary);
    color: #fff;
}

.timeline-content h3 {
    margin: 0 0 10px 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
}

.timeline-content p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}


.background-card-num {
    position: absolute;
    font-size: 8rem !important;
    line-height: 0;
    font-weight: 1000;
    opacity: 0.07;
    bottom: 40px;
    right: -15px;
}

#portfolio {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.img-gallery {
    display: flex;
    max-width: 1200px;
    height: 800px;
}

.img-gallery .left-col,
.img-gallery .right-col {
    width: 50%;
}

.img-gallery .left-col {
    height: 100%;
}

.img-gallery .left-col {
    height: 100%;
    margin: 10px;
}

.img-gallery .img-box {
    position: relative;
    overflow: hidden;
    border-radius: 3rem;
    margin: 10px;
    padding: 25px;
    color: white;
    -webkit-user-drag: none;

    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.img-gallery .left-col .img-box {
    height: 100%;
}

.img-gallery .right-col .img-box {
    height: 50%;
}

#elifbot {
    background-image: linear-gradient(0deg,
            rgba(0, 0, 0, 0.8),
            rgba(0, 0, 0, 0)), url('/static/img/portfolio/elifbot.png');
    background-position: center;
    background-size: 150%;
    transition: background-size 0.5s ease;
}

#twojareklama {
    background-image: linear-gradient(0deg,
            rgba(0, 0, 0, 0.8),
            rgba(0, 0, 0, 0)), url('/static/img/portfolio/twojareklama.png');
    background-size: 150%;
    transition: background-size 0.5s ease;
}

#soon {
    background-image: linear-gradient(0deg,
            rgba(0, 0, 0, 0.8),
            rgba(0, 0, 0, 0)), url('/static/img/portfolio/soon.png');
    background-position: center;

    background-size: 150%;
    transition: background-size 0.5s ease;
}

.img-gallery .img-box img {
    position: absolute;
    top: 0;
    left: 0;
}

.img-gallery .img-box:hover {
    background-size: 170% !important;
}

.img-gallery .img-box:hover>.img-desc {
    transform: translateY(0);
}

.img-box .img-desc {
    transform: translateY(130px);
    transition: ease all 200ms;
}

.img-desc h2 {
    font-size: 28px;
    margin-bottom: 15px;
}

.img-desc p {
    height: 108px;
}