/* Reset marginesów, paddingów i ujednolicenie */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* Zmienne globalne */
:root {
    --font-primary: 'Red Hat Text', sans-serif;
    --font-secondary: 'Syne', sans-serif;
    --primary-color: rgb(247, 58, 152);
    --secondary-color: rgb(185, 255, 111);
    --color-text: #000000;
    --color-bg: #f1f1f1;
    --color-border: rgb(179, 179, 179);
}

/* ------------- BASE STYLES ------------- */

html {
    font-size: 20px;
    line-height: 1.4;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--color-text);
    background-color: var(--color-bg);
}

::selection {
    background: var(--secondary-color);
    color: #000;
}

h1 {
  font-size: clamp(2.2rem, 4.2vw, 6.2rem);
  line-height: 1;
  font-family: var(--font-secondary);
  font-weight: 700;
}

h2 {
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: var(--color-text);
}

a:active {
  color: var(--color-border);
}

section {
  margin: 2rem 0; 
}

.portfolio {
  height: 90vh;
}

.padding-2rem {
  padding: 2rem 0;
}

.section-title {
    justify-content: flex-start;
 }

 .section-title h2 {
  font-size: clamp(2.3rem, 3.5vw, 5.2rem);
  line-height: 1;
  font-family: var(--font-secondary);
  font-weight: 700;
}

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.full-width {
  width: 100%;
  margin: 0;
  padding: 0 1.5rem;
}

.flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-center {
  justify-content: center;
  display: flex;
}

.glassmorphism {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(50px);
    -webkit-backdrop-filter: blur(50px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Buttons */

button {
  cursor: pointer;
}

svg {
  width: 1rem;
}

.btn-rounded, .btn-color, .project-category {
  border-radius: 30px;
  padding: 0.4em 1em;
  align-items: center;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid var(--color-border);
  background: none;
  margin: 1px 0;
}

.btn-color {
  background-color: var(--secondary-color);
  border: 1px solid var(--secondary-color);
}

.btn-color svg {
  width: 1em;
  height: 1em;
  stroke: currentColor; /* dziedziczy kolor tekstu */
  vertical-align: middle;
}

.arrow-btn {
  border-radius: 50%;
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0.6em 1.1em;
  color: var(---color-text);
  border: 1px solid var(--color-border);
  align-items: center;
  margin: 0.1rem 0;
  font-family: inherit;
  background: none;
  font-size: 1rem;
}

.btn-rounded:hover, .btn-color:hover, .arrow-btn:hover {
  color: #fff;
  border: 1px solid var(--color-text);
  background-color: var(--color-text);
}

.btn-rounded.active {
  color: #fff;
  border: 1px solid var(--color-text);
  background-color: var(--color-text);
}


/* ------------- HEADER ------------- */

/* Logo */
.logo {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
  }

.logo img {
  max-height: 4vh;
  transition: rotate 1s;
  width: auto;
  height: 4vh;
}

.logo img:hover {
  rotate: 360deg;
}

.logo-text {
  transform: translateX(0%); /* ukryty poza widokiem po lewej */
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
  white-space: nowrap; 
}

.logo:hover .logo-text {
  transform: translateX(25px); /* przesuwa się w prawo do widoku */
  opacity: 1;
  color: var(--color-text);
}

/* Pasek Header */
body.admin-bar #header {
  top: 32px; /* tyle ma pasek admina na desktopie */
}

#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 8vh;
    display: flex;
    justify-content: center; /* centrowanie kontenera wewnątrz */
    z-index: 2; /* nad wszystkim */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-container {
    display: flex;
    align-items: center;
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
    justify-content: space-between;
    padding: 0 1.5rem;
} 

/* Nawigacja */
.main-menu {
  justify-content: space-between;
}

.menu-list {
  list-style: none;
  margin: 0;
  padding: 0; 
}

.menu-list li {
  margin-left: 4rem;
}

.menu-list a {
  position: relative;       /* potrzebne do ::after */
  text-decoration: none;    /* usuwa domyślne podkreślenie */
  color: var(--color-text);              /* kolor tekstu */
  transition: color 0.3s ease;
}

.menu-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;             /* grubość podkreślenia */
  background-color: #000;  /* kolor podkreślenia */
  transform: scaleX(0);    /* start z zerową szerokością */
  transform-origin: left;  /* animacja od lewej */
  transition: transform 0.3s ease;
}

.menu-list a:hover::after {
  transform: scaleX(1);    /* rozciąga podkreślenie przy hover */
}

.menu-list a:active {
  transform: scaleX(1);    /* rozciąga podkreślenie przy hover */
}

/* ------------- FOOTER ------------- */
footer {
  margin: 1rem 0;
}

.social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    text-align: center;
    width: 100%;
    position: relative;
    height: auto;
    margin: 0 0 8rem 0;
}

.social-icons svg {
  width: auto;
  height: 2.2rem;
  fill: var(---color-text);
  transition: color 0.3s ease;
}

.social-icons a:hover svg {
    fill: var(--secondary-color);
}

.copyright {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
}


/* ------------- FRONT PAGE ------------- */

/* Sekcja Hero */
#hero {
    text-align: center;
    justify-content: center;
    display: flex;
    align-items: center;
    height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

#hero h1 {
  font-size: clamp(3.2rem, 9vw, 12rem);
  line-height: 0.9;
}

#hero h1 span {
    opacity: 1; /* Dla Lighthouse i botów: od razu widoczne */
    transform: none;
}

/* Sekcja Portfolio */
#portfolio {
  position: relative;
  overflow: hidden;
  height: auto;
  margin: 3rem 0;
  z-index: 1;
}

 /* Kategorie projektow */
.portfolio-categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    width: auto;
}

.hide {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
}

/* Pozycjonowanie przycisków */
.portfolio-arrows {
  display: flex;
  gap: 0.5rem;
}

.portfolio-arrows .arrow:hover {
  background: var(--color-text);
  color: white;
}


/* Kafelki projektow */
.projects-grid {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 1.2rem;
  padding: 1rem 1.5rem;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.projects-grid::-webkit-scrollbar {
  display: none;
}

.projects-grid {
    -ms-overflow-style: none;  /* IE i Edge */
    scrollbar-width: none;     /* Firefox */
}

.project-tile {
  transition:
    opacity 0.35s ease,
    transform 0.35s ease,
    max-width 0.35s ease,
    margin 0.35s ease,
    padding 0.35s ease;
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
  max-width: 50vh;
  width: auto;
  flex: 0 0 auto;
    
}

.project-image {
  aspect-ratio: 1 / 1;
  box-shadow: 0 4px 30px rgba(0,0,0,0.1);
  background-color: #fff;
  border-radius: 10px;
  overflow: hidden;
  object-fit:cover;
  position: relative;
  
}

.project-image img {
    transition: transform 0.3s ease;
    object-fit:cover;
    object-position: center;
    display: block;
    width: 100%;
    height: 100%;
}

/* Stan animujący chowanie (najpierw animujemy, potem po transitionend ustawiamy display none) */
.project-tile.hiding {
  opacity: 0;
  transform: scale(0.96);
  max-width: 0;      /* zwężamy do zera */
  margin: 0;
  padding: 0;
  pointer-events: none;
}

/* Po zakończeniu animacji ukrywamy element (display none) */
.project-tile.hidden {
  display: none !important;
}

/* Gdy pokazujemy (możesz dodać jeśli chcesz inny stan przy pokazywaniu) */
.project-tile.showing {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.project-overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    opacity: 0;              /* niewidoczny domyślnie */
    transition: opacity 0.3s ease;
    padding: 2rem;
    display: flex;
    align-items: end;
  }

.project-overlay .project-category{
  font-size: 0.9em;
}

.project-tile:hover .project-overlay {
    opacity: 1; /* pojawia się przy hover */
}

.project-tile:hover img {
    transform: scale(1.05); /* lekki zoom przy hover */
}

h3.project-title {
  color: var(--color-text);
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0.8rem 0;
  max-width: 40vh;
  font-family: var(--font-secondary);
}

/* ------------- SINGLE PORTFOLIO ------------- */

.single-portfolio main {
  width: 100%;
  position: relative;
  margin: 15vh 0;
}

.single-portfolio .container {
  border-radius: 16px;
}

#project-title {
  display: flex;
  align-items: center;
  justify-content: left;
  height: auto;
  padding: 4rem 0;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.project-columns {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4rem;
  gap: 10rem;
}

.project-excerpt {
  width: 70%;
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
}

.project-meta {
  width: 30%;
  font-size: 1rem;
  line-height: 1.7rem;
}

.project-meta-title {
  font-weight: 600;
}

.project-meta-element {
  margin-bottom: 1.3rem;
}

.project-description {
  background-color: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  margin: 0;
}

.project-description p {
  padding: 0.5rem 1.5rem;
}

.wp-block-list {
  padding: 0.5rem 1.5rem 0.5rem 3rem;
}

.wp-block-heading {
  padding: 3rem 1.5rem 1rem 1.5rem; 
}

.wp-block-gallery {
  padding: 1.5rem;
}


 /* ------------- MEDIA QUERIES ------------- */

@media (max-width: 768px) {

  body.admin-bar #header {
    top: 46px; /* na mobile pasek WP jest wyższy */
  }

  .copyright {
    flex-direction: column;
    text-align: center;
  }

  #hero {
    height: 50vh;
    padding-top: 2rem;
  }
  
  .flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    justify-content: center;
  }

  .project-tile {
    width: 75vw;
  }

  #project-title {
    height: auto;
    padding: 1rem 0;
  }

  .project-excerpt, .project-meta {
    width: 100%;
    font-size: 1rem;
  }

  .project-columns {
    flex-direction: column-reverse;
    gap: 1rem;
    margin-bottom: 1rem;
  }

  .portfolio-arrows {
    display: none;
  }

   .project-description {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    width: 100vw;
    border-radius: 0px;
  }

  .project-description .wp-block-image,
  .project-description .wp-block-gallery,
  .project-description img {
    width: 100%;
    height: auto;
  }

  /* Jeśli w środku .project-description WordPress wstawia kontenery */
  .project-description {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
  }

  /* Menu mobilne */

.menu-list {
  display: none;
}

.menu-list li {
    margin: 1rem 0;
  }

.menu-open .menu-list {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
    position: fixed;
    left: 0;
    top: 0;
    font-size: 2rem;
    padding: 0;
    margin: 0;
    z-index: 9998;
    background-color: #fff;
    
  }

 .hamburger-menu {
  width: 30px;
  height: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 9999;
  position: relative;
}

.hamburger-menu span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-text);
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
}

.menu-open .hamburger-menu span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.menu-open .hamburger-menu span:nth-child(2) {
  opacity: 0;
}

.menu-open .hamburger-menu span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

}


@media (min-width: 768px) {
    .hamburger-menu {
        display: none;
    }

    .menu-list {
        display: flex;
    }
}


/* ------------- ANIMATIONS ------------- */


/* Fade In Up */
@keyframes fadeInUp {
  0% {
    transform: translateY(50px);
    opacity: 0;
  }
  100% {
    transform: translateY(0%);
    opacity: 1;
  }
}

.fadeInUp {
  opacity: 0;
  transform: translateY(50px);
}

.fadeInUp.animate {
  animation: 1.2s fadeInUp forwards;
  animation-delay: var(--delay);
}


/* Blobs */

  .wrapper, .gradient {
    will-change: transform, opacity;
    z-index: 0;
}

 .wrapper {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
        filter: blur(80px);
        z-index: 0;
      }

.gradient {
        position: absolute;
        border-radius: 100%;
        opacity: 0.8;
        mix-blend-mode: screen;
        animation-iteration-count: infinite;
        animation-timing-function: cubic-bezier(0.1, 0, 0.9, 1);
        z-index: 0;
      }
      
  .gradient-1 {
    background: rgb(136, 255, 0) none repeat scroll 0% 0% / auto padding-box border-box;
    width: 50vw;
    height: 50vw;
    animation-duration: 11s;
    opacity: 0.8;
    left: 70%;
    top: 0%;
    z-index: 0;
    animation-name: animation-gradient-1;
  }

  .gradient-2 {
    background: var(--primary-color) none repeat scroll 0% 0% / auto padding-box border-box;
    width: 35vh;
    height: 35vh;
    animation-duration: 11s;
    opacity: 0.8;
    left: 35%;
    top: 40%;
    z-index: 0;
    animation-name: animation-gradient-2;
  }

  .gradient-3 {
    background: rgb(140, 0, 255) none repeat scroll 0% 0% / auto padding-box border-box;
    width: 25vh;
    height: 25vh;
    animation-duration: 11s;
    opacity: 0.8;
    left: 25%;
    top: 70%;
    z-index: 0;
    animation-name: animation-gradient-3;
  }

      @keyframes animation-gradient-1 {
        0% {
          transform: translateY(-50%) translateX(-50%) rotate(-20deg) translateX(20%);
        }
        25% {
          transform: translateY(-50%) translateX(-50%) skew(-15deg, -15deg)
            rotate(80deg) translateX(30%);
        }
        50% {
          transform: translateY(-50%) translateX(-50%) rotate(180deg) translateX(25%);
        }
        75% {
          transform: translateY(-50%) translateX(-50%) skew(15deg, 15deg)
            rotate(240deg) translateX(15%);
        }
        100% {
          transform: translateY(-50%) translateX(-50%) rotate(340deg) translateX(20%);
        }
      }
      
      @keyframes animation-gradient-2 {
        0% {
          transform: translateY(-50%) translateX(-50%) rotate(40deg) translateX(-20%);
        }
        25% {
          transform: translateY(-50%) translateX(-50%) skew(15deg, 15deg)
            rotate(110deg) translateX(-5%);
        }
        50% {
          transform: translateY(-50%) translateX(-50%) rotate(210deg) translateX(-35%);
        }
        75% {
          transform: translateY(-50%) translateX(-50%) skew(-15deg, -15deg)
            rotate(300deg) translateX(-10%);
        }
        100% {
          transform: translateY(-50%) translateX(-50%) rotate(400deg) translateX(-20%);
        }
      }
      
      @keyframes animation-gradient-3 {
        0% {
          transform: translateY(-50%) translateX(-50%) translateX(-15%)
            translateY(10%);
        }
        20% {
          transform: translateY(-50%) translateX(-50%) translateX(20%)
            translateY(-30%);
        }
        40% {
          transform: translateY(-50%) translateX(-50%) translateX(-25%)
            translateY(-15%);
        }
        60% {
          transform: translateY(-50%) translateX(-50%) translateX(30%) translateY(20%);
        }
        80% {
          transform: translateY(-50%) translateX(-50%) translateX(5%) translateY(35%);
        }
        100% {
          transform: translateY(-50%) translateX(-50%) translateX(-15%)
            translateY(10%);
        }
      }


/* Animacja dla normalnego użytkownika */
@media (prefers-reduced-motion: no-preference) {
    #hero h1 span {
        opacity: 0;
        transform: translateY(50px);
        animation: fadeInUp 1.2s forwards;
        animation-delay: var(--delay, 0s);
    }

    #hero h1 span:nth-child(1) {
        animation-delay: 0.2s;
    }

    #hero h1 span:nth-child(2) {
        animation-delay: 0.5s;
    }

    #hero h1 span:nth-child(3) {
        animation-delay: 0.8s;
    }

    #hero h1 span:nth-child(4) {
        animation-delay: 1.1s;
    }
}

/* Gutenberg */

.wp-block-gallery img {
    width: auto !important;
    max-width: 100%;
    margin: 0 auto;
}

.wp-block-gallery {
	gap: 1.5rem !important;
}

.blocks-gallery-caption {
	font-size: 0.7rem;
}

.wp-block-columns {
	padding: 0 1.5rem;
}