/* =========================================
   1. BASE STYLES & RESET
   ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  box-sizing: border-box;
}

body {
  font-family: "Open Sans", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #868686;
  margin: 0;
}

body.no-scroll {
    overflow: hidden;
}

a {
  color: #111;
  text-decoration: none;
  transition: color 0.3s ease;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

figure {
  margin: 0;
}

img {
  display: inline-block;
  border: 0;
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  outline: 0;
}

::selection {
  background: rgba(0,0,0,0.8);
  color: #fff;
  text-shadow: none;
}

::placeholder {
  color: #494949;
  transition: color .2s;
}

.align-center {
  display: block;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  justify-content: center;
}

.text-justify {
    text-align: justify;
}

/* =========================================
   2. TYPOGRAPHY
   ========================================= */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-family: "Source Sans Pro", Roboto, sans-serif;
  text-transform: capitalize;
  margin: 0 0 25px;
  color: #024033;
}

.section-title {
    font-size: 3.8em;
    line-height: 1;
    font-weight: 500;
    color: #024033;
}

.section-title.light {
    color: #fff;
}

@media screen and (max-width: 768px) {
    .section-title {
        font-size: 1.8em;
        line-height: 1.3;
        word-wrap: break-word;
        padding: 0 15px;
    }
}

p {
   margin: 0 0 20px 0;
}

p:empty {
  display: none;
}

/* =========================================
   3. COMPONENTS (Buttons, Grid, Lightbox)
   ========================================= */
.container {
    max-width: 1280px;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.inner-content {
    width: 100%;
    padding: 0 20px;
}

.grid {
    display: flex;
    justify-content: space-between;   
}

.btn-wrap {
    display: flex;
}

.btn-wrap a {
    font-weight: 500;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-accent {
    background-color: #3f3f3f;
    color: #fff;
    padding: 20px 40px;
}
.btn-accent:hover {
    background-color: #3f807e;
}

.btn-pill {
    border-radius: 50px;
}

.btn-outline-orange {
    border: 1px solid #3f807e;
    color: #fff;
    padding: 20px 50px;
}
.btn-outline-orange:hover {
    background: #3f807e;
}

.btn-outline-dark {
    border: 1px solid #3f3f3f;
    color: #3f3f3f;
    padding: 20px 50px;
}
.btn-outline-dark:hover {
    background-color: #3f3f3f;
    color: #f5f5f5;
}

.btn-arrow {
    background: none; 
}
.btn-arrow.light {
    color: #fff;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: zoom-out;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
}

/* =========================================
   4. HEADER & NAVIGATION (Consolidated)
   ========================================= */
#header .header-wrap {
    position: absolute;
    padding: 40px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    top: 0;
    z-index: 10;
}

.header-wrap .main-logo img {
    width: 10vw;
    height: auto;
}

@media screen and (max-width: 768px) {
    .header-wrap .main-logo img {
        width: 18vw; 
    }
    
    #header .header-wrap {
        padding: 20px; 
    }
}

@media screen and (min-width: 1081px) {
    
    .top-menu ul {
        display: flex;
        margin: 0;
    }

    .top-menu li {
        margin-right: 30px;
        position: relative;
    }

    .top-menu .menu-list > li > a {
        font-size: 1em;
        color: #fff;
        text-decoration: none;
        padding-bottom: 5px;
        font-weight: 400; 
        border-bottom: 2px solid transparent; 
        transition: all 0.3s ease;
    }

    .top-menu .menu-list > li > a:hover,
    .top-menu .menu-list > li.active > a {
        color: #fff !important;
        font-weight: 600; 
        border-bottom: 2px solid #fff; 
    }

    .top-menu li.has-submenu {
        position: relative;
    }

    .top-menu li.has-submenu > .submenu {
        position: absolute;
        top: 100%;
        left: -300px;
        background: rgba(0,0,0,0.9);
        padding: 10px 0;
        min-width: 500px;
        border-radius: 4px;
        
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s ease;
        z-index: 999;
        display: block; 
        
        flex-direction: column !important;
        margin: 0;
        list-style: none;
    }

    .top-menu li.has-submenu:hover > .submenu {
        opacity: 1;
        visibility: visible;
    }

    .top-menu li.has-submenu > .submenu li {
        display: block !important;
        width: 100% !important;
        margin: 0;
    }

    .top-menu li.has-submenu > .submenu li a {
        display: block !important;
        width: 100% !important;
        padding: 8px 25px;
        color: #fff; /* Biały tekst w submenu */
        text-align: left;
        white-space: normal;
        overflow-wrap: break-word;
        box-sizing: border-box;
        border-bottom: none !important; /* Brak podkreślenia w submenu */
        font-weight: 400 !important;
    }

    .top-menu li.has-submenu > .submenu li a:hover {
        color: #3f807e !important; /* Turkus po najechaniu w submenu */
        background: rgba(255,255,255,0.05);
    }
}

@media screen and (min-width: 1081px) {
    .menu-icon {
        display: none;
    }
}

@media screen and (max-width: 1080px) {

    /* Icon Container */
    .menu-icon {
        display: block;
        position: fixed;
        top: 20px;
        right: 20px;
        z-index: 99999;
    }

    /* Icon Style */
    .bar-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 50px;
        height: 50px;
        background: rgba(0,0,0,0.6);
        border-radius: 5px;
        color: #fff;
        font-size: 2em;
        cursor: pointer;
        transition: background 0.3s;
        text-decoration: none;
    }
    
    .bar-icon:hover {
        background: #3f807e;
    }

    .menu-icon .open-menu { display: flex !important; }
    .menu-icon .close-menu { display: none !important; }
    .menu-icon .icon-close { display: block !important; }

    .top-menu ul.menu-list {
        display: none;
    }

    .top-menu.menu-bar ul.menu-list {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        padding: 90px 40px 40px 40px;
        background: rgba(0,0,0,0.98);
        text-align: center;
        z-index: 9998;
        overflow-y: auto;
    }

    .top-menu.menu-bar li {
        margin: 15px 0;
        width: 100%;
        display: block;
    }

    .top-menu.menu-bar a {
        font-size: 1.4em;
        color: #fff !important; 
        display: block;
        padding: 5px;
        transition: color 0.3s ease;
    }

    .top-menu.menu-bar a:hover,
    .top-menu.menu-bar li.active > a {
        color: #3f807e !important;
    }

    .top-menu.menu-bar .menu-icon .open-menu { display: none !important; }
    .top-menu.menu-bar .menu-icon .close-menu { 
        display: flex !important;
        color: #fff; 
        background: rgba(0,0,0,0);
    }

    .top-menu.menu-bar li.has-submenu > .submenu {
        position: static !important;
        display: none; 
        opacity: 1 !important;
        visibility: visible !important;
        background: transparent;
        padding: 0;
        min-width: auto;
        transform: none;
        left: auto;
        box-shadow: none;
        width: 100%;
        text-align: center;
    }
    
    .top-menu.menu-bar .submenu li { margin: 0; }
    
    .top-menu.menu-bar .submenu li a {
        font-size: 1.1em;
        text-align: center !important; 
        padding: 10px 0;
        display: block;
    }
}

/* =========================================
   5. BILLBOARD (Hero Section)
   ========================================= */
#billboard {
    position: relative;
    width: 100%;
    margin-bottom: 170px;
}

#billboard img.banner-image {
    width: 100%;
    height: auto;
    display: block;
}

#billboard .banner-content {
    position: relative;
    margin-top: -420px;
    margin-left: 200px;
    color: #fff;
    width: 50%;
}

#billboard .banner-header h1 {
    font-size: 3.5em;
    line-height: 1.1;
    margin: 0;
}

#billboard .banner-header p {
    font-size: 1.1em;
    margin: 25px 0 35px;
    max-width: 520px;
}

#billboard .btn-wrap {
    margin-top: 20px;
}

/* Billboard Responsive */
@media screen and (max-width: 1480px){
    #billboard img.banner-image {
        min-height: 550px;
        object-fit: cover;
    }
    #billboard .banner-content {
        margin-top: -400px; 
        width: 60%;
    }
}

@media screen and (max-width: 1180px){
    #billboard img.banner-image {
        min-height: 550px;
        object-fit: cover;
    }
    #billboard .banner-content {
        margin-top: -380px;
        margin-left: 60px;
        width: 70%;
    }
}

@media screen and (max-width: 768px){
    #billboard {
        margin-bottom: 80px;
        position: relative;
    }
    #billboard img.banner-image {
        height: 65vh;
        object-fit: cover;
        object-position: center;
    }
    #billboard .banner-content {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        margin: 0;
        width: 90%;
        text-align: center;
    }
    #billboard .banner-header h1 {
        font-size: 2.2em;
        line-height: 1.2;
    }
    #billboard .banner-header p {
        font-size: 1.1em;
        margin: 15px auto 30px auto;
    }
    #billboard .btn-wrap {
        justify-content: center;
    }
}

/* =========================================
   6. ABOUT ME SECTION
   ========================================= */
#about-me .person-information {
    display: flex;
    justify-content: space-between;
    margin-bottom: 60px;
}

#about-me .person-information .description {
    width: 50%;
    margin-right: 120px;
}

.person-information p {
    line-height: 2.5;
    color: #024033;
}

.person-information .general-button {
    display: flex;
    flex-wrap: wrap;
    margin-top: 60px;
}

.person-information .general-button .btn-wrap {
    margin-right: 20px;
    margin-bottom: 20px;
}

/* Skills Chart */
.person-information .skill-chart {
    width: 50%;
}
.skill-chart li {
    border-bottom: 4px solid #eaeaea;
    margin-bottom: 40px;
    width: 100%;
}
.skill-chart li span.skill {
    display: block;
    border-bottom: 4px solid #3f807e;
    padding-bottom: 24px;
    margin-bottom: -4px;
}
/* Percentages */
.skill-chart li span.fifty-percent { width: 50%; }
.skill-chart li span.sixty-percent { width: 60%; }
.skill-chart li span.seventy-percent { width: 70%; }
.skill-chart li span.eighty-percent { width: 80%; }
.skill-chart li span.ninety-percent { width: 90%; }

/* About Me Responsive */
@media screen and (max-width: 768px){
    #about-me .section-header {
        text-align: center;
        width: 100%;
    }
    #about-me .person-information {
        flex-wrap: wrap;
        justify-content: center;
    }
    #about-me .person-information .description {
        width: 100%;
        margin-right: 0;
        margin-left: 0;
        margin-bottom: 60px;
        text-align: center;
    }
    .person-information p {
        text-align: center !important;
    }
    .person-information .general-button {
        justify-content: center;
        width: 100%;
    }
    .person-information .general-button .btn-wrap {
        margin: 10px;
    }
    .person-information .skill-chart {
        width: 100%;
        margin-right: 0;
        text-align: center;
    }
}

/* =========================================
   7. PORTFOLIO SECTION
   ========================================= */
#portfolio {
    color: #fff;
    padding: 60px 0 60px;
}

/* Force White Text in Portfolio */
#portfolio a,
#portfolio a *,
#portfolio h3,
#portfolio span,
#portfolio i {
    color: #fff !important;
}

/* Tabs */
[data-tab-content] {
    display: none;
    position: unset;
}
.active[data-tab-content] {
    display: block;
}

.tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 20px; 
}

.tabs .tab {
    font-size: 1.0em;
    color: #024033;
    padding: 10px 20px;
    margin-right: 20px;
    text-transform: capitalize;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.tabs .tab:after {
    content: "•";
    position: absolute;
    right: -14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.6em;
    color: #024033;
    line-height: 1;
}

.tabs .tab.active,
.tabs .tab:hover {
    color: #3f807e;
    font-weight: 600;
    border-bottom: 2px solid #3f807e;
}

.tabs .tab:last-child::after {
    content: none;
}

/* Grid & Items */
.tab-content {
    position: relative;
    margin-bottom: 60px;
}

.tab-content .tab-element {
    display: flex;
    flex-wrap: wrap; 
    justify-content: center;
}

.tab-content .tab-element figure {
    width: 30%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    margin-right: 20px;
    margin-bottom: 20px;
    position: relative;
    cursor: pointer;
}

.tab-content .tab-element figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
}

/* Hover Effect Desktop */
.tab-element figure:hover:before {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
    pointer-events: none;
}

.tab-content .tab-element figcaption {
    position: absolute;
    bottom: 0;
    left: 32px;
    z-index: 9;
    width: 80%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    opacity: 0;
    transition: 0.5s ease-out;
}

.tab-content .tab-element figure:hover figcaption {
    bottom: 30px;
    opacity: 1;
}

.tab-content .tab-element .caption {
    width: 60%;
    margin-right: 20px;
}

.tab-content .tab-element h3 {
    font-size: 1.6em;
    text-transform: capitalize;
    margin: 0;
}

.tab-content .tab-element .btn-arrow.light {
    width: 10%;
}

/* Portfolio Responsive */
@media screen and (max-width: 1080px) {
    /* Mobile Permanent Overlay */
    .tab-element figure:before {
        content: '';
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1;
        pointer-events: none;
    }
    .tab-content .tab-element figcaption {
        opacity: 1 !important;
        bottom: 30px !important;
    }
}

@media screen and (max-width: 900px){
  .tab-content .tab-element .caption { width: 100%; }
  .tab-content .tab-element h3 { font-size: 1.2em; }
}

@media screen and (max-width: 768px) {
    .tabs { flex-wrap: wrap; gap: 10px 0; }
    .tabs .tab {
        font-size: 1em;
        padding: 10px 5px;
        margin-right: 0;
        width: 50%;
        display: flex;
        justify-content: center;
        text-align: center;
    }
    .tabs .tab:after { display: none; }
}

@media screen and (max-width: 656px){
  .tab-content .tab-element figure { width: 45%; }
}

@media screen and (max-width: 456px){
  .tab-content .tab-element figure { width: 100%; margin-right: 0; }
  .tabs .tab { font-size: 0.9em; }
}

/* =========================================
   8. CONTACT SECTION
   ========================================= */
#contact {
    background-color: #1a1a1a;
    padding: 60px 0 100px;
    text-align: center;
}

#contact h2 {
    font-size: 2em;
    color: #fff;
}

#contact p {
    font-size: 1.2em;
    color: #d9d9d9;
    width: 40%;
    margin: 0 auto 60px;
}

.contact-map iframe {
    width: 100% !important;
    height: 450px;
    max-width: 100%;
}

.contact-info a {
    color: #fff !important;
    text-decoration: none;
}
.contact-info a:hover {
    color: #ccc !important;
}

@media screen and (max-width: 980px) {  
  #contact h2 { line-height: 1; }
  #contact p { width: 60%; }
}

@media screen and (max-width: 900px) {
    .contact-map {
        min-width: 100% !important; 
        flex: 0 0 100%;
    }
    #contact .row {
        flex-direction: column;
    }
    .contact-info {
        min-width: 100% !important;
        margin-bottom: 40px;
    }
}

/* =========================================
   9. FOOTER SECTION
   ========================================= */
#footer-bottom {
    background-color: #1a1a1a;
    border-top: 1px solid #3e3e3e;
    padding: 50px 0;
}

.copyright a {
    color: #e69b1f;
}

@media screen and (max-width: 799px) {
  #footer-bottom .grid {
      flex-wrap: wrap;
      justify-content: center;
  }
}


/* =========================================
   10. PROJECT PAGES (Template)
   ========================================= */

@media screen and (min-width: 1081px) {
    
    body.projekty .header-wrap .top-menu .menu-list > li > a {
        color: #024033 !important;
        font-weight: 400;
        border-bottom: 2px solid transparent;
        padding-bottom: 5px;
        transition: all 0.3s ease;
    }

    body.projekty .header-wrap .top-menu .menu-list > li > a:hover {
        color: #3f807e !important;
        font-weight: 600;
        border-bottom: 2px solid #3f807e;
    }

    body.projekty .header-wrap .top-menu .menu-list > li.active > a {
        color: #3f807e !important;
        font-weight: 600;
        border-bottom: 2px solid #3f807e;
    }
}

body.projekty .header-wrap .top-menu .submenu a {
    color: #fff !important;       
    font-weight: 400 !important;  
    border-bottom: none !important; 
    padding: 8px 25px;            
}

body.projekty .header-wrap .top-menu .submenu a:hover {
    color: #3f807e !important;
    background: rgba(255,255,255,0.05);
}

.project-hero {
    padding: 180px 0 40px;
    background-color: #f9f9f9;
}

.project-meta {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
    color: #868686;
}

.project-meta li {
    font-size: 1em;
}

.project-details {
    padding: 40px 0 120px;
}

.project-description {
    max-width: 1200px;
    margin: 60px auto 80px;
    text-align: justify;
}

.project-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px; 
}

.project-gallery figure {
    width: calc(40% - 15px);
    margin: 0;
    display: flex;
    flex-direction: column; 
}

.project-gallery figure img {
    width: 100%;
    aspect-ratio: 4 / 3; 
    object-fit: cover;   
    display: block;
    cursor: zoom-in;
    background-color: #eee; 
    transition: transform 0.3s ease;
}

.project-gallery figure img:hover {
    filter: brightness(0.9); 
}

.project-gallery figcaption {
    margin-top: 10px;
    font-size: 0.9em;
    color: #939393;
    text-align: center;
}

/* Responsywność */
@media screen and (max-width: 600px) {
    .project-gallery figure {
        width: 100%; 
    }
}

/* =========================================
   11. ERROR 404 PAGE
   ========================================= */
.error-404-container {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background: url('./images/gif.gif'); 
    background-position: center;
    background-repeat: no-repeat;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    font-family: sans-serif;
}

.error-404-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.error-404-container .error-code {
    position: absolute;
    top: 3rem;
    font-size: 7rem;
    color: #00000063;
    line-height: 1;
}

.error-404-container .error-heading {
    position: absolute;
    bottom: 8rem;
    font-size: 34px;
    line-height: 1.2;
    text-align: center;
}

.error-404-container .error-subheading {
    position: absolute;
    bottom: 6rem;
    color: #9c9c9c;
    font-size: 14px;
    text-align: center;
}

.error-404-container .error-home-btn {
    position: absolute;
    bottom: 1rem;
    background: linear-gradient(45deg, #ff0034, #ffbc00);
    padding: 12px 24px;
    color: white;
    text-decoration: none;
    font-size: 23px;
    border-radius: 13px;
    transition: transform 0.2s ease;
    white-space: nowrap;
}

.error-404-container .error-home-btn:hover {
    transform: scale(1.05);
}

/* =========================================
   12. CONTACT PAGE STYLING (Light Theme)
   ========================================= */

.contact-hero {
    background-color: #3f807e; 
    padding: 160px 0 60px;    
    text-align: center;
}

.contact-hero .section-title {
    margin-bottom: 10px;
    font-size: 3.5em;
}

.contact-hero .subtitle {
    color: #e0e0e0;
    font-size: 1.2em;
    font-weight: 300;
}

#contact-page {
    background-color: #fff; 
    padding: 80px 0 100px;
    color: #444;
}

#contact-page .row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    align-items: center; 
}

/* Lewa kolumna: Teksty */
.contact-details {
    flex: 1;
    min-width: 300px;
    padding-right: 40px;
    text-align: left; 
}

.contact-heading {
    font-size: 2em;
    color: #024033;
    margin-bottom: 30px;
    position: relative;
}

.contact-heading::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #3f807e; 
    margin-top: 10px;
}

.contact-details .name {
    font-size: 1.4em;
    font-weight: 600;
    color: #111;
    margin-bottom: 5px;
}

.contact-details .location {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 40px;
}

.contact-links p {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #333;
}

.contact-links a {
    color: #024033; 
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-links a:hover {
    color: #3f807e; 
}

/* Prawa kolumna: Mapa */
.contact-map-wrapper {
    flex: 1;
    min-width: 300px;
    height: 450px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); 
}

.contact-map-wrapper iframe {
    width: 100%;
    height: 100%;
}

@media screen and (max-width: 900px) {
    #contact-page .row {
        flex-direction: column;
        gap: 50px;
    }
    
    .contact-details {
        padding-right: 0;
        text-align: center;
        width: 100%;
    }
    
    .contact-heading::after {
        margin: 10px auto; 
    }

    .contact-map-wrapper {
        width: 100%;
        height: 350px;
    }
}

@media screen and (max-width: 768px) {
    .contact-hero .section-title {
        font-size: 2em;
    }
}