@font-face {
    font-family: Jost;
    src: url('/templates/nin-geo-muz/fonts/Jost-vf.woff2');
}

@font-face {
    font-family: Jost;
    src: url('/templates/nin-geo-muz/fonts/Jost-Italic-vf.woff2');
    font-style: italic;
}

:root {
  font-family: Jost, "Open Sans", Arial, serif;
  letter-spacing: 0.05rem;
}

.body > .container {
  position: relative;
  /*overflow: hidden;*/ /*hide unwanted content*/
  width: 100%;
}

.body {
  position: relative;
  z-index: 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/*html {
    overflow-x: hidden;
    overflow-y: scroll;
}*/

@keyframes slideBackground {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 100% center;
    }
}

body {
    font-family: 'Jost', sans-serif;
    background: #333;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    padding-bottom: 110px;
}

header.header {
  max-width: initial;
  background-color: #fff;
  padding: 10px 10px;
}

header .header-inner {
  display: grid;
  grid-template-columns: repeat(2, auto);
  align-items: center;
  justify-content: space-between;
  max-width: 1300px;
  margin: 0 auto;
}

header .rightbox {
  width: initial !important;
  min-width: initial !important;
  display: initial !important;
}

/* Animowane tło - niezależne od treści */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/images/projekty/portal-inspire/2025/background1.png') repeat-x center center;
    background-size: auto 100%;
    animation: slideBackground 80s linear infinite;
    z-index: -2;
}

/* Gradient na tle */
.animated-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, transparent 50%, rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
}

/* Floating logos */
.floating-logo {
    position: fixed;
    width: 250px;
    height: 250px;
    background-image: url('/images/projekty/portal-inspire/2025/logo_inspire.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0;
    pointer-events: none;
    z-index: -1;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        opacity: 0.3;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.8);
    }
}

/* Tile wrapper for glow effect */
.tile-wrapper {
    filter: drop-shadow(0 0 0px rgba(0, 0, 0, 0));
    transition: filter 0.8s ease-in-out;
}

.tile-wrapper.glowing {
    filter: drop-shadow(0 0 25px rgba(0, 0, 0, 0.8))
            drop-shadow(0 0 45px rgba(0, 0, 0, 0.5));
}

/* Nagłówek sekcji */
.inspire-header {
    background: #ffffff;
    padding: 4px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    width: 100%;
    position: relative;
    z-index: 100;
    height: 50px;
}

.inspire-header-content {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    height: 100%;
}

.inspire-logo {
    height: 38px;
    width: auto;
    display: block;
    vertical-align: middle;
}

.inspire-header a {
    display: flex;
    align-items: center;
    line-height: 0;
}

/* Stopka */
.inspire-footer {
    background: #ffffff;
    padding: 8px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.inspire-footer-content {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
}

.footer-logo {
    height: 65px;
    width: auto;
    display: block;
}

.inspire-nav {
    display: flex;
    gap: 30px;
}

.inspire-nav a {
    color: #1a1a1a;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.inspire-nav a:hover {
    color: #3498db;
}

.inspire-nav a.active {
    color: #3498db;
    font-weight: 600;
}

/* Podstrony */
.page {
    display: none;
}

.page.active {
    display: block;
}

#page-home.active {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 60px);
}

#page-home .inspire-container {
    width: 100%;
}

.page-content {
    max-width: 900px;
    margin: 60px auto;
    padding: 40px 50px;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.page-content h2 {
    font-size: 1.8rem;
    color: #1a1a1a;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.page-content p {
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 20px;
    text-align: justify;
}

.page-content a {
    color: #3498db;
    text-decoration: none;
}

.page-content a:hover {
    text-decoration: underline;
}

.page-content ol {
    margin: 0 0 20px 20px;
    padding-left: 20px;
}

.page-content li {
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 8px;
    text-align: justify;
}

/* Kontener główny */
.inspire-container {
    max-width: 1300px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Nagłówki grup */
.group-title {
    font-size: 1.8rem;
    color: #34495e;
    margin-bottom: 30px;
    padding-left: 20px;
    border-left: 4px solid #3498db;
    font-weight: 600;
}

/* Separator w postaci kreski */
.section-divider {
    width: 100vw;
    height: 30px;
    background: rgba(255, 255, 255, 0.35);
    margin: 35px 0;
    margin-left: calc(-50vw + 50%);
}

.section-separator {
    height: 0;
}

/* Sekcja zewnętrzna z białym przezroczystym tłem do stopki */
.external-section-wrapper {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    /*background: rgba(255, 255, 255, 0.4);*/
    padding: 35px 0;
    padding-bottom: 110px;
    margin-bottom: -110px;
    flex-grow: 1;
}

.external-section-wrapper .tiles-grid {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Siatka kafli - wszystkie kafle tej samej wielkości */
.tiles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 0px;
    row-gap: 25px;
    margin-bottom: 0;
}

/* Pierwsza sekcja PIG-PIB - układ 3 kafle w pierwszym rzędzie, 3 w drugim */
#pigpib {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 0;
    row-gap: 25px;
    justify-items: center;
}

/* Pierwszy rząd - 3 kafle (każdy zajmuje 1 kolumnę) */
#pigpib .tile-wrapper:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
}

#pigpib .tile-wrapper:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
}

#pigpib .tile-wrapper:nth-child(3) {
    grid-column: 3;
    grid-row: 1;
    width: 100%;
}

/* Drugi rząd - 3 kafle (każdy zajmuje 1 kolumnę) */
#pigpib .tile-wrapper:nth-child(4) {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
}

#pigpib .tile-wrapper:nth-child(5) {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
}

#pigpib .tile-wrapper:nth-child(6) {
    grid-column: 3;
    grid-row: 2;
    width: 100%;
}

/* Druga sekcja - 3 kafle w jednym rzędzie */
#external {
    grid-template-columns: repeat(3, 1fr);
}

/* KAFEL - kontener główny z overflow hidden */
.tile {
    position: relative;
    width: 100%;
    height: 320px;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    display: block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    border-radius: 15px;
    opacity: 0.80;
    transition: opacity 0.3s ease;
}

.tile:hover {
    opacity: 1;
}

/* Obrazek tła - 70% szerokości, wyjeżdża w górę przy hover */
.tile-image {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    width: 70%;
    height: 80%;
    background-size: 100% auto;
    background-position: top center;
    background-repeat: no-repeat;
    z-index: 1;
    transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out;
    border-radius: 15px;
}

/* Po hover - obrazek WYJEŻDŻA W GÓRĘ i znika */
.tile:hover .tile-image {
    transform: translateX(-50%) translateY(-20%);
    opacity: 0;
}

/* NAKŁADKA - 70% szerokości, zaczyna od 24% wysokości, zakotwiczona do dołu */
.tile-label {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 24%;
    background: #e67e22;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 20px;
    transition: height 0.4s ease-in-out, background 0.4s ease-in-out, border-radius 0.4s ease-in-out;
    border-radius: 0 0 15px 15px;
}

/* Po hover - nakładka rozszerza się DO GÓRY do 100% wysokości */
.tile:hover .tile-label {
    height: 100%;
    background: #ffffff !important;
    justify-content: flex-start;
    padding-top: 20px;
    border-radius: 15px;
}

/* TYTUŁ - nie zmienia się, pozostaje na swoim miejscu */
.tile-title {
    font-size: 1.2rem;
    font-weight: 500;
    text-transform: uppercase;
    color: #ffffff;
    line-height: 1.1;
    margin: 0 0 -13px 0;
    letter-spacing: 0.04em;
}

/* Po hover - tytuł zmienia tylko kolor i czcionkę */
.tile:hover .tile-title {
    color: #e67e22;
    font-size: 1.3rem;
    margin-bottom: 0;
}

/* Czarna kreska pod tytułem - pojawia się po hover */
.tile-title-line {
    width: 100%;
    height: 1px;
    background: #1a1a1a;
    margin: 12px auto 0 auto;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.tile:hover .tile-title-line {
    opacity: 1;
}

/* Zmiana koloru tytułu dla różnych kafli - odcienie szarości wierszami */
.tile.color-1:hover .tile-title { color: #3a3a3a; }
.tile.color-2:hover .tile-title { color: #3a3a3a; }
.tile.color-3:hover .tile-title { color: #3a3a3a; }
.tile.color-4:hover .tile-title { color: #3a3a3a; }
.tile.color-5:hover .tile-title { color: #3a3a3a; }
.tile.color-6:hover .tile-title { color: #3a3a3a; }
.tile.color-7:hover .tile-title { color: #5a5a5a; }
.tile.color-8:hover .tile-title { color: #5a5a5a; }
.tile.color-9:hover .tile-title { color: #5a5a5a; }

/* OPIS - ukryty domyślnie */
.tile-desc {
    font-size: 0.95rem;
    line-height: 1.65;
    color: #1a1a1a;
    font-weight: 400;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.4s ease, max-height 0.4s ease;
    margin-top: 0;
}

/* Po hover - opis pojawia się pod kreską */
.tile:hover .tile-desc {
    opacity: 1;
    max-height: 400px;
    margin-top: 12px;
}

/* KRESKA na dole */
.tile-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 6px;
    background: #e67e22;
    z-index: 3;
    transition: width 0.35s ease 0.15s;
}

/* Po hover - kreska rozsuwa się do 70% szerokości */
.tile:hover .tile-line {
    width: 70%;
}

/* Kolory tła nakładki i kreski dla poszczególnych kafli - odcienie szarości wierszami */
/* Wiersz 1 - bardzo ciemny szary */
.tile.color-1 .tile-label { background: #3a3a3a; }
.tile.color-1 .tile-line { background: #3a3a3a; }

.tile.color-2 .tile-label { background: #3a3a3a; }
.tile.color-2 .tile-line { background: #3a3a3a; }

.tile.color-3 .tile-label { background: #3a3a3a; }
.tile.color-3 .tile-line { background: #3a3a3a; }

/* Wiersz 2 - taki sam jak wiersz 1 */
.tile.color-4 .tile-label { background: #3a3a3a; }
.tile.color-4 .tile-line { background: #3a3a3a; }

.tile.color-5 .tile-label { background: #3a3a3a; }
.tile.color-5 .tile-line { background: #3a3a3a; }

.tile.color-6 .tile-label { background: #3a3a3a; }
.tile.color-6 .tile-line { background: #3a3a3a; }

/* Wiersz 3 - średnio-ciemny szary */
.tile.color-7 .tile-label { background: #5a5a5a; }
.tile.color-7 .tile-line { background: #5a5a5a; }

.tile.color-8 .tile-label { background: #5a5a5a; }
.tile.color-8 .tile-line { background: #5a5a5a; }

.tile.color-9 .tile-label { background: #5a5a5a; }
.tile.color-9 .tile-line { background: #5a5a5a; }

/* Responsive */
@media (max-width: 1024px) {
    #pigpib,
    #external {
        grid-template-columns: repeat(2, 1fr);
    }

    #pigpib .tile-wrapper:nth-child(1),
    #pigpib .tile-wrapper:nth-child(2),
    #pigpib .tile-wrapper:nth-child(3),
    #pigpib .tile-wrapper:nth-child(4),
    #pigpib .tile-wrapper:nth-child(5),
    #pigpib .tile-wrapper:nth-child(6) {
        grid-column: auto !important;
        grid-row: auto !important;
    }
}

@media (max-width: 768px) {
    .inspire-header-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .inspire-logo {
        height: 30px;
    }

    .inspire-nav {
        flex-direction: row;
        gap: 20px;
    }

    #pigpib,
    #external {
        grid-template-columns: 1fr;
    }

    #pigpib .tile-wrapper:nth-child(1),
    #pigpib .tile-wrapper:nth-child(2),
    #pigpib .tile-wrapper:nth-child(3),
    #pigpib .tile-wrapper:nth-child(4),
    #pigpib .tile-wrapper:nth-child(5),
    #pigpib .tile-wrapper:nth-child(6) {
        grid-column: auto !important;
        grid-row: auto !important;
    }

    .tile {
        height: 280px;
    }
}