/* ==========================================================================
   WINKEL SYSTEMS - REDESIGNED SYSTEM STYLES (FACTORYFORM INSPIRATION)
   ========================================================================== */

/* 1. CSS RESET & GLOBAL STYLES */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #ffffff;
    color: #111111;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

/* Typography elements */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #111111;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* ==========================================================================
   2. TOP HEADER BAR (BLACK)
   ========================================================================== */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 75px;
    background-color: #000000;
    color: #ffffff;
    z-index: 1000;
    border-bottom: 1px solid #1a1a1a;
}

.top-bar-container {
    max-width: 1600px;
    height: 100%;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo Badge and Text */
.top-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-badge {
    background-color: #ffffff;
    color: #000000;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 0.1em;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.top-logo:hover .logo-badge {
    transform: rotate(360deg);
}

.logo-text {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #ffffff;
}

/* Right Section Tagline & Contact info */
.header-right {
    display: flex;
    align-items: center;
    gap: 40px;
}

.slogan {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-weight: 500;
    color: #888888;
}

.contact-links {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.phone-link, .email-link {
    color: #ffffff;
    opacity: 0.85;
    position: relative;
    padding-bottom: 2px;
}

.phone-link::after, .email-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #ffffff;
    transition: width 0.25s ease;
}

.phone-link:hover::after, .email-link:hover::after {
    width: 100%;
}

.phone-link:hover, .email-link:hover {
    opacity: 1;
}

.separator {
    color: #444444;
    margin: 0 10px;
}

/* Mobile Toggle Hamburger button */
.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1100;
}

.mobile-toggle .bar {
    width: 100%;
    height: 2px;
    background-color: #ffffff;
    transition: all 0.3s ease;
}

/* Mobile toggle active/open state */
.mobile-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ==========================================================================
   3. SIDEBAR NAVIGATION
   ========================================================================== */
.main-container {
    display: flex;
    max-width: 1600px;
    margin: 0 auto;
    padding-top: 75px; /* Offset for the top bar */
}

.sidebar {
    width: 320px;
    position: fixed;
    top: 75px;
    bottom: 0;
    left: max(0px, calc((100vw - 1600px) / 2)); /* Centers with grid */
    border-right: 1px solid #eaeaea;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 900;
    overflow-y: auto;
    background-color: #ffffff;
}

/* Navigation lists */
.menu-group {
    margin-bottom: 45px;
}

.menu-title {
    display: block;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #999999;
    margin-bottom: 20px;
}

.menu-list li {
    margin-bottom: 12px;
}

.nav-link-item {
    font-size: 14px;
    color: #444444;
    font-weight: 500;
    position: relative;
    padding-left: 0;
    transition: all 0.2s ease;
}

.nav-link-item::before {
    content: '— ';
    color: #cccccc;
    opacity: 0;
    margin-right: 0;
    transition: all 0.2s ease;
    display: inline-block;
    width: 0;
    overflow: hidden;
}

.nav-link-item.active, .nav-link-item:hover {
    color: #000000;
    font-weight: 600;
}

.nav-link-item.active::before, .nav-link-item:hover::before {
    opacity: 1;
    width: 18px;
    margin-right: 4px;
}

/* Sidebar Footer elements */
.sidebar-footer {
    border-top: 1px solid #eaeaea;
    padding-top: 30px;
    margin-top: 30px;
}

.lang-switch {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #888888;
}

.lang-link {
    padding: 2px 4px;
}

.lang-link.active {
    color: #000000;
}

.lang-sep {
    color: #cccccc;
    margin: 0 4px;
}

.social-links {
    display: flex;
    gap: 18px;
    margin-bottom: 25px;
    font-size: 14px;
    color: #777777;
}

.social-links a:hover {
    color: #000000;
}

.copyright-info {
    font-size: 11px;
    color: #888888;
    line-height: 1.5;
}

.cookies-link {
    text-decoration: underline;
}

.cookies-link:hover {
    color: #000000;
}

/* ==========================================================================
   4. CONTENT COLUMN
   ========================================================================== */
.content {
    margin-left: 320px;
    width: calc(100% - 320px);
    padding: 60px 80px 100px 80px;
}

/* SECTION HEADERS */
.section-header {
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 20px;
    margin-bottom: 50px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.project-prefix {
    color: #cccccc;
    font-weight: 300;
    margin-right: 6px;
}

/* HERO SECTION */
.hero-section {
    padding: 40px 0 100px 0;
    max-width: 900px;
}

.hero-headline {
    font-size: 42px;
    line-height: 1.15;
    font-weight: 800;
    color: #000000;
    margin-bottom: 30px;
    letter-spacing: -0.03em;
}

.hero-subline {
    font-size: 17px;
    color: #555555;
    font-weight: 400;
    line-height: 1.7;
    max-width: 800px;
}

/* ==========================================================================
   5. PORTFOLIO GRID
   ========================================================================== */
.portfolio-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 80px 50px;
    padding-bottom: 100px;
}

.project-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

/* Zoom Image Effect Wrapper */
.project-image-wrapper {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background-color: #f7f7f7;
    border: 1px solid #f0f0f0;
    margin-bottom: 24px;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-img {
    transform: scale(1.04);
}

/* Meta Data Text & Title */
.project-meta {
    padding-left: 5px;
}

.project-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    display: inline-block;
    position: relative;
}

.project-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #000000;
    transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-title::after {
    width: 100%;
}

.project-desc {
    font-size: 13px;
    color: #777777;
    font-weight: 500;
}

/* ==========================================================================
   6. PROFILE / ABOUT SECTION
   ========================================================================== */
.about-section {
    padding: 100px 0;
    max-width: 1000px;
}

.about-lead {
    font-size: 22px;
    font-weight: 500;
    line-height: 1.6;
    color: #111111;
    margin-bottom: 50px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.about-col h3 {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
    color: #000000;
}

.about-col p {
    font-size: 14px;
    color: #555555;
    line-height: 1.7;
}

.about-col ul li {
    font-size: 14px;
    color: #555555;
    margin-bottom: 12px;
    position: relative;
    padding-left: 20px;
}

.about-col ul li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: #cccccc;
}

/* ==========================================================================
   7. CONTACT SECTION
   ========================================================================== */
.contact-section {
    padding: 100px 0 140px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 80px;
}

.contact-info-block h3, .contact-address-block h3 {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 25px;
}

.contact-pitch {
    font-size: 16px;
    color: #555555;
    max-width: 500px;
    margin-bottom: 40px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-detail-row {
    font-size: 15px;
}

.contact-detail-row .label {
    display: inline-block;
    width: 90px;
    font-weight: 600;
    color: #888888;
}

.contact-detail-row .value {
    color: #000000;
    font-weight: 700;
    border-bottom: 1px solid transparent;
}

.contact-detail-row .value:hover {
    border-bottom: 1px solid #000000;
}

.address-text {
    font-size: 14px;
    color: #555555;
    line-height: 1.8;
}

/* ==========================================================================
   8. BACK TO TOP BUTTON
   ========================================================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background-color: #ffffff;
    border: 1px solid #eaeaea;
    color: #111111;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #000000;
    color: #ffffff;
    border-color: #000000;
    transform: translateY(-3px);
}

/* ==========================================================================
   9. RESPONSIVE DESIGN (BREAKPOINTS)
   ========================================================================== */

/* Large screens center offset adjustment */
@media (min-width: 1601px) {
    .sidebar {
        left: calc((100vw - 1600px) / 2);
    }
}

/* Breakpoint for tablet layouts (under 1200px) */
@media (max-width: 1200px) {
    .content {
        padding: 50px 40px 80px 40px;
    }
    
    .portfolio-list {
        gap: 50px 30px;
    }
}

/* Breakpoint for laptop/tablet shift to top bar navigation (under 991px) */
@media (max-width: 991px) {
    .mobile-toggle {
        display: flex;
    }

    .sidebar {
        position: fixed;
        top: 75px;
        left: -320px; /* Hidden on left side */
        width: 280px;
        height: calc(100vh - 75px);
        box-shadow: 15px 0 30px rgba(0, 0, 0, 0.05);
        border-right: 1px solid #eaeaea;
        transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        padding: 40px 30px;
    }

    .sidebar.active {
        left: 0; /* Sliding in */
    }

    .content {
        margin-left: 0;
        width: 100%;
        padding: 40px 24px 60px 24px;
    }

    .hero-section {
        padding: 20px 0 60px 0;
    }

    .hero-headline {
        font-size: 32px;
    }

    .portfolio-list {
        grid-template-columns: 1fr; /* Single column */
        gap: 50px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}

/* Mobile views (under 575px) */
@media (max-width: 575px) {
    .top-bar-container {
        padding: 0 20px;
    }

    .logo-text {
        font-size: 14px;
    }

    .slogan {
        display: none; /* Hide tagline to fit telephone */
    }

    .header-right {
        gap: 15px;
    }

    .contact-links {
        font-size: 11px;
    }

    .content {
        padding: 30px 16px 50px 16px;
    }

    .hero-headline {
        font-size: 26px;
    }

    .hero-subline {
        font-size: 15px;
    }

    .section-title {
        font-size: 17px;
    }

    .about-lead {
        font-size: 18px;
        margin-bottom: 30px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
    }

    /* Hide telephone on top bar on small screens to fit language toggle */
    .phone-link {
        display: none;
    }
    .contact-links .separator:first-of-type {
        display: none;
    }
}

/* ==========================================================================
   10. MULTI-LANGUAGE DISPLAY STYLES
   ========================================================================== */
html:not([lang="en"]) [lang="en"] {
    display: none !important;
}

html[lang="en"] [lang="pl"] {
    display: none !important;
}

.lang-switch-top {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.lang-link-top {
    color: rgba(255, 255, 255, 0.4);
    padding: 2px 4px;
    transition: color 0.2s ease;
}

.lang-link-top.active {
    color: #ffffff;
}

.lang-link-top:hover {
    color: #ffffff;
}

.lang-sep-top {
    color: #444444;
    margin: 0 4px;
}
