
:root {
    --text: #e8f5f6;
    --background: #060f10;
    --primary: #9ad7d6;
    --secondary: #2c476d;
    --accent: #5c69be;
    --primary-light: rgba(154, 215, 214, 0.75);
    --primary-lighter: rgba(154, 215, 214, 0.2);
    --primary-dark: #7abcbb;
    --accent-light: rgba(92, 105, 190, 0.7);
    --text-light: #b8d2d3;
    --text-on-primary: #060f10;
    --text-on-accent: white;
}


body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: var(--background);
    color: var(--text);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}


.container {
    width: 80%;
    max-width: 1200px;
    margin: 0 auto;
}


header {
    background-color: var(--primary);
    color: var(--text-on-primary);
    padding: 1rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease, background-color 0.3s ease;
    z-index: 1000;
}


.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 0.4rem 1rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
    animation: slideDown 0.5s ease;
    background-color: transparent; /* Remove background color */
    transition: all 0.3s ease;
}


.sticky-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-light); /* Semi-transparent background */
    z-index: -1;
    backdrop-filter: blur(4px); /* Slight blur effect for better readability */
    -webkit-backdrop-filter: blur(4px); /* For Safari support */
}


.sticky-header:hover::before {
    background: rgba(154, 215, 214, 0.9); /* More opaque on hover */
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.sticky-header .header-content {
    max-width: 1300px;
}

.sticky-header .header-left {
    gap: 12px;
}

.sticky-header .erasmus-logo {
    height: 45px;
    transition: height 0.3s ease;
}

.sticky-header h1 {
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.sticky-header p {
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.sticky-header .flag {
    height: 32px;
    transition: height 0.3s ease;
}


.sticky-header nav {
    background-color: rgba(154, 215, 214, 0.6);
    margin-top: 8px;
    transition: all 0.3s ease;
}

.sticky-header #pbox {
    padding: 6px 12px;
}

.sticky-header #przycisk {
    padding: 4px 12px;
    font-size: 0.75rem;
}


.header-content, 
.header-left, 
.erasmus-logo, 
header h1, 
header p, 
.flag, 
nav, 
#pbox, 
#przycisk {
    transition: all 0.3s ease;
}

.header-nav-container {
    width: 100%;
    position: relative;
    z-index: 100;
    transition: all 0.3s ease;
}


body.has-sticky-header {
    padding-top: 150px; /* A more reliable default value */
    transition: padding-top 0.3s ease;
}

@media screen and (max-width: 991px) {
    body.has-sticky-header {
        padding-top: 220px; /* Adjusted for mobile */
    }
    
    .sticky-header .header-content {
        flex-direction: row;
        align-items: center;
    }
    
    .sticky-header .header-left {
        flex-direction: row;
        margin-bottom: 0;
    }
    
    .sticky-header .flags-container {
        margin: 0;
    }
}

@media screen and (max-width: 768px) {
    .sticky-header .header-content {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .sticky-header .erasmus-logo {
        height: 40px;
    }
    
    .sticky-header .flag {
        height: 25px;
    }
    
    .sticky-header #przycisk {
        padding: 3px 10px;
        font-size: 0.7rem;
    }
    
    .sticky-header h1 {
        font-size: 1rem;
    }
    
    .sticky-header p {
        display: none; /* Hide description on very small screens */
    }
}


header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(154, 215, 214, 0.9) 0%, rgba(154, 215, 214, 0.95) 100%);
    z-index: -1;
    transition: background 0.3s ease;
}


.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}


.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}


.erasmus-logo {
    height: 65px;
    width: auto;
    transition: transform 0.3s ease;
}

.erasmus-logo:hover {
    transform: scale(1.05);
}


.header-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

header h1 {
    margin: 0;
    font-size: 1.4rem;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    font-weight: 700;
}

header p {
    margin: 5px 0 0 0;
    font-size: 0.85rem;
    opacity: 0.9;
}


.flags-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.flag {
    height: 42px;
    width: auto;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.flag:hover {
    transform: translateY(-2px);
}


nav {
    background-color: rgba(154, 215, 214, 0.8);
    border-radius: 8px;
    margin-top: 12px;
    max-width: 768px;
    margin-left: auto;
    margin-right: auto;
}

#pbox {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 8px 15px;
    margin-top: 6px;
}


#przycisk {
    background-color: transparent;
    border: 1px solid rgba(6, 15, 16, 0.3);
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-on-primary);
    display: inline-block;
    padding: 6px 15px;
    box-sizing: border-box;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

#przycisk:hover {
    background-color: var(--accent);
    transform: translateY(-2px);
    border-color: var(--accent);
    color: var(--text-on-accent);
}


.header-nav-container {
    width: 100%;
    position: relative;
    z-index: 100;
}


@media screen and (min-width: 992px) {
    header {
        padding: 0.8rem 1.5rem;
    }
    
    .header-content {
        align-items: center;
    }
    
    nav {
        margin-top: 0;
        background-color: transparent;
        padding: 0;
    }
    
    .header-content {
        gap: 30px;
    }
    
    #pbox {
        padding: 0;
    }
    
    #przycisk {
        font-size: 0.75rem;
        padding: 5px 12px;
    }
}

@media screen and (max-width: 991px) {
    .header-content {
        flex-direction: column;
        align-items: center;
    }
    
    .header-left {
        flex-direction: column;
        text-align: center;
        margin-bottom: 10px;
    }
    
    .header-title {
        align-items: center;
        text-align: center;
    }
    
    .flags-container {
        margin: 10px 0;
    }
    
    nav {
        width: 100%;
    }
}

@media screen and (max-width: 768px) {
    .container {
        width: 95%;
    }
    
    #pbox {
        flex-direction: column;
        align-items: center;
    }
    
    #przycisk {
        width: 80%;
        text-align: center;
        margin: 5px 0;
    }

    .image-container img {
        width: 100%;
        margin-bottom: 1.5rem;
    }
    
    header {
        padding: 1.5rem 1rem;
    }
    
    section {
        padding: 1.5rem;
    }

    .header-logos {
        flex-direction: column;
        gap: 15px;
    }
    
    .erasmus-logo {
        height: 60px;
    }
    
    .flags-container {
        gap: 10px;
    }
    
    .flag {
        height: 30px;
    }
}


main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

section {
    margin: 2rem auto;
    padding: 2rem;
    background-color: #0d1819;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

section:hover {
    transform: translateY(-3px);
}

h2, h3 {
    color: var(--primary);
    border-bottom: 2px solid #1a2b2d;
    padding-bottom: 0.5rem;
    margin-top: 0;
}


#index_main {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: stretch; /* Changed from center to stretch */
    justify-content: space-between;
}

#index {
    flex: 1;
    min-width: 200px;
    display: flex; /* Added display flex */
    flex-direction: column; /* Added to organize content vertically */
    height: 100%; /* Ensures full height */
    justify-content: space-between;
}

#index h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

#index h4 {
    font-size: 1.5rem;
    color: var(--text-light);
    font-weight: 500;
    line-height: 1.2;
    margin: 0;
}

#index p {
    margin-bottom: 0; /* Removes default margin to align with photos */
    font-size: 15px;
}

#index_photo {
    flex: 1;
    min-width: 200px;
    text-align: center;
    display: flex; /* Added display flex */
    flex-direction: column; /* Added to organize content vertically */
    height: 100%; /* Ensures full height */
}

#index_photo img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 15px; /* Added margin between images */
    object-fit: cover; /* Ensures proper image sizing */
}

#index_photo img:last-child {
    margin-bottom: 0; /* Removes margin from last image */
}

#index_photo img:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

#index_photo h3 {
    margin-bottom: 20px;
}


#index_main > section {
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Align content to top */
    background-color: #0d1819;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Restored transition for hover effect */
}


#index_main > section:hover {
    transform: translateY(-5px); /* Slightly more pronounced lift effect */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); /* Enhanced shadow on hover */
}


#index_main > section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px; /* Slightly thicker accent line */
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: height 0.3s ease; /* Animate the accent line */
}

#index_main > section:hover::before {
    height: 7px; /* Grow the accent line on hover */
}


#text_main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    align-items: start; /* Align items at the top */
}

#about_project, #project_goals {
    height: auto; /* Change from 100% to auto */
    display: flex;
    flex-direction: column;
    min-height: 85%; /* Set minimum height instead of fixed height */
}


@supports (display: grid) {
    #text_main {
        grid-auto-rows: 1fr; /* Force equal heights */
    }
}


#text_main > section:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4) !important; /* Enhanced shadow on hover */
}


#text_main > section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px; /* Slightly thicker accent line */
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: height 0.3s ease; /* Animate the accent line */
}

#text_main > section:hover::before {
    height: 7px; /* Grow the accent line on hover */
}


section {
    margin: 2rem auto;
    padding: 2rem;
    background-color: #0d1819;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

section:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}


section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}


h2, h3 {
    color: var(--primary);
    border-bottom: 2px solid #1a2b2d;
    padding-bottom: 0.5rem;
    margin-top: 0;
    position: relative;
}

h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary);
}


p {
    margin-bottom: 1.2rem;
    line-height: 1.7;
}


@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

main section {
    animation: fadeIn 0.6s ease forwards;
}

#index_main {
    animation-delay: 0.1s;
}

#text_main section:nth-child(1) {
    animation-delay: 0.3s;
}

#text_main section:nth-child(2) {
    animation-delay: 0.5s;
}


@media screen and (max-width: 768px) {
    #text_main {
        grid-template-columns: 1fr; /* Single column on mobile */
    }
}

ul {
    list-style-type: square;
    padding-left: 1.5rem;
}

ul li {
    margin-bottom: 0.8rem;
    position: relative;
}

ul li::before {
    content: "";
    position: absolute;
    left: -20px;
    top: 10px;
    width: 6px;
    height: 6px;
    background-color: var(--accent);
    border-radius: 50%;
}


.image-container {
    display: flex;
    justify-content: space-around;
    margin: 1.5rem 0;
    flex-wrap: wrap;
    gap: 20px;
}

.image-container img {
    width: 30%;
    min-width: 250px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    object-fit: cover;
}

.image-container img:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.4);
}


.gallery-main {
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-page {
    display: none;
}

.gallery-page.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    line-height: 0; /* Remove line height spacing */
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: all 0.3s ease;
    display: block; /* Make it a block element */
    margin: 0; /* Remove any margin */
    vertical-align: bottom; /* For backup inline-block case */
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    line-height: 1.5; /* Restore proper line height for text */
}


.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}


.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    gap: 15px;
}

.pagination-btn {
    background-color: #0d1819;
    border: 2px solid var(--accent);
    color: var(--accent);
    padding: 8px 15px;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background-color: var(--accent);
    color: white;
    transform: translateY(-2px);
}

.page-indicators {
    display: flex;
    gap: 8px;
}

.page-indicator {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid #1a2b2d;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.page-indicator:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.page-indicator.active {
    background-color: var(--primary);
    color: var(--text-on-primary);
    border-color: var(--primary);
}


.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: zoomIn 0.3s ease;
}

#lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 1;
    transition: opacity 0.3s ease;
}

#lightbox-caption {
    color: white;
    text-align: center;
    padding: 15px;
    font-size: 1.2rem;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 35px;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s ease;
}

.close-lightbox:hover {
    color: var(--primary);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-nav:hover {
    background: rgba(154, 215, 214, 0.7);
}

.lightbox-nav.prev {
    left: 20px;
}

.lightbox-nav.next {
    right: 20px;
}


@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}


@media screen and (max-width: 768px) {
    .gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
        padding: 15px;
    }
    
    .gallery-item img {
        height: 180px;
    }
    
    .pagination-btn {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .page-indicator {
        width: 30px;
        height: 30px;
    }
    
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    /* Mobile optimization for gallery pagination */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .page-indicators {
        order: 3; /* Move page indicators below the prev/next buttons */
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        padding: 5px 0;
        overflow-x: auto; /* Allow horizontal scrolling if needed */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        scrollbar-width: none; /* Hide scrollbar on Firefox */
    }
    
    .page-indicators::-webkit-scrollbar {
        display: none; /* Hide scrollbar on Chrome/Safari */
    }
    
    .page-indicator {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
        margin: 2px;
    }
    
    /* Make pagination buttons full width */
    .pagination-btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
}

@media screen and (max-width: 480px) {
    .gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
        padding: 10px;
    }
    
    .gallery-item img {
        height: 150px;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
    
    .close-lightbox {
        top: 10px;
        right: 10px;
        font-size: 28px;
    }
    
    #lightbox-caption {
        font-size: 1rem;
        padding: 10px;
    }
    
    .page-indicator {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
        margin: 1px;
    }
    
    .pagination {
        gap: 5px;
    }
    
    .pagination-btn {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
}


.practice-locations {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin: 2rem 0;
}

.practice-card {
    display: flex;
    flex-direction: column;
    background: #0d1819;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #1a2b2d;
}

.practice-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.practice-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-bottom: 3px solid var(--primary);
}

.practice-info {
    padding: 20px;
}

.practice-info h3 {
    margin-top: 0;
    color: var(--primary);
    font-size: 1.4rem;
}

.practice-type {
    font-style: italic;
    color: #a1c1c2;
    margin-bottom: 15px;
    font-weight: 500;
}

.practice-info h4 {
    color: #c4dfe0;
    margin: 15px 0 10px 0;
    font-size: 1.1rem;
}


@media screen and (min-width: 768px) {
    .practice-card {
        flex-direction: row;
        align-items: stretch;
    }
    
    .practice-card img {
        width: 30%;
        height: auto;
        border-bottom: none;
        border-right: 3px solid var(--primary);
    }
    
    .practice-info {
        width: 70%;
        display: flex;
        flex-direction: column;
    }
}

@media screen and (max-width: 767px) {
    .practice-card img {
        height: 180px;
    }
}


@media screen and (max-width: 768px) {
    /* Make the sticky header more compact */
    .sticky-header {
        padding: 0.2rem 0.5rem;
    }
    
    .sticky-header .header-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 5px;
        flex-wrap: nowrap; /* Prevent wrapping */
    }
    
    .sticky-header .header-left {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        margin-bottom: 0;
    }
    
    .sticky-header .erasmus-logo {
        height: 30px;
    }
    
    .sticky-header h1 {
        font-size: 0.85rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 160px;
    }
    
    .sticky-header p {
        display: none;
    }
    
    .sticky-header .flags-container {
        margin: 0;
        gap: 5px;
    }
    
    .sticky-header .flag {
        height: 20px;
    }
    
    /* Condense the navigation in sticky mode */
    .sticky-header nav {
        margin-top: 2px;
        background-color: rgba(154, 215, 214, 0.8);
    }
    
    .sticky-header #pbox {
        flex-direction: row; /* Make buttons horizontal instead of vertical */
        flex-wrap: wrap;
        padding: 3px 6px;
        gap: 3px;
    }
    
    .sticky-header #przycisk {
        padding: 4px 8px;
        font-size: 0.65rem;
        margin: 0;
        width: auto; /* Override the default width */
        border-radius: 15px;
    }
    
    /* Adjust body padding for the new header height */
    body.has-sticky-header {
        padding-top: 110px; /* Significantly reduced from 220px */
    }
}


@media screen and (max-width: 480px) {
    .sticky-header h1 {
        max-width: 120px; /* Even smaller title for tiny screens */
    }
    
    .sticky-header .erasmus-logo {
        height: 25px;
    }
    
    .sticky-header .flag {
        height: 18px;
    }
    
    .sticky-header nav {
        max-width: 100%;
    }
    
    .sticky-header #pbox {
        justify-content: center;
    }
    
    body.has-sticky-header {
        padding-top: 100px; /* Further reduced */
    }
}


@media screen and (max-width: 375px) {
    .sticky-header .header-content {
        padding: 2px 0;
    }
    
    .sticky-header h1 {
        max-width: 100px;
        font-size: 0.75rem;
    }
    
    .sticky-header #przycisk {
        padding: 3px 6px;
        font-size: 0.6rem;
    }
    
    body.has-sticky-header {
        padding-top: 90px;
    }
}


@media screen and (max-width: 480px) {
    /* Update these properties to be more compact */
    #pbox {
        flex-direction: row; /* Change from column to row */
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 5px;
        padding: 5px;
    }
    
    #przycisk {
        width: auto; /* Override the 80% width */
        text-align: center;
        padding: 5px 10px;
        font-size: 0.75rem;
        margin: 2px;
    }
}


.participants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin: 1.5rem 0;
}

.participant-card {
    background: #0d1819;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #1a2b2d;
}

.participant-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

.participant-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
    border-bottom: 2px solid var(--primary);
}

.participant-info {
    padding: 15px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.participant-info h4 {
    margin: 0 0 5px 0;
    color: var(--primary);
    font-size: 1.2rem;
}

.participant-info p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.9rem;
}


.participant-card {
    position: relative;
}

.participant-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 70%, rgba(154, 215, 214, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.participant-card:hover::after {
    opacity: 1;
}


@media screen and (max-width: 768px) {
    .participants-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }
    
    .participant-card img {
        height: 160px;
    }
    
    .participant-info h4 {
        font-size: 1.1rem;
    }
}

@media screen and (max-width: 480px) {
    .participants-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }
    
    .participant-card img {
        height: 140px;
    }
    
    .participant-info {
        padding: 10px;
    }
    
    .participant-info h4 {
        font-size: 1rem;
    }
    
    .participant-info p {
        font-size: 0.8rem;
    }
}


.institution-card {
    display: flex;
    flex-direction: column;
    background: #0d1819;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 30px;
    border: 1px solid #1a2b2d;
}

.institution-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.institution-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-bottom: 3px solid var(--primary);
}

.institution-info {
    padding: 20px;
}

.institution-info h3 {
    margin-top: 0;
    color: var(--primary);
    font-size: 1.4rem;
}

.institution-info p {
    margin-bottom: 15px;
}


@media screen and (min-width: 768px) {
    .institution-card {
        flex-direction: row;
        align-items: stretch;
    }
    
    .institution-card img {
        width: 30%;
        height: auto;
        border-bottom: none;
        border-right: 3px solid var(--primary);
    }
    
    .institution-info {
        width: 70%;
        display: flex;
        flex-direction: column;
    }
}

@media screen and (max-width: 767px) {
    .institution-card img {
        height: 180px;
    }
}


footer {
    background-color: #0d1819;
    color: var(--text-light);
    padding: 2rem 1rem;
    text-align: center;
    margin-top: 2rem;
    border-top: 3px solid var(--primary-lighter);
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.2);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 1.5rem;
}

.footer-logo {
    display: block;
    transition: transform 0.3s ease;
}

.footer-logo:hover {
    transform: scale(1.05);
}

.footer-logo img {
    max-width: 180px;
    height: auto;
    border-radius: 5px;
}

.footer-info {
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-credits {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
    opacity: 0.7;
}

@media screen and (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .footer-logo {
        margin-right: auto;
    }
    
    .footer-info {
        text-align: right;
        margin-left: auto;
    }
    
    .footer-credits {
        width: 100%;
        text-align: center;
        margin-top: 1.5rem;
        padding-top: 1rem;
        border-top: 1px solid var(--primary-lighter);
    }
}

@media screen and (max-width: 767px) {
    .footer-content > * {
        width: 100%;
    }
}


.facebook-posts-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin: 2rem 0;
}

.facebook-post {
    background: #0d1819;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #1a2b2d;
}

.facebook-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.facebook-post h3 {
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.post-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin: 15px 0;
    width: 100%;
    overflow: hidden;
    flex-wrap: wrap;
    gap: 20px;
}


.facebook-iframe, 
.post-container iframe {
    max-width: 100%;
    width: 500px;
    height: 787px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    padding: 3px;
    margin-bottom: 10px;
}

.post-placeholder {
    max-width: 100%;
    width: 500px;
    min-height: 200px;
    background-color: rgba(154, 215, 214, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    color: var(--text-light);
    border: 1px dashed var(--primary-lighter);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}


.iframe-link-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
}


.post-link-button {
    display: inline-block;
    background-color: var(--primary-dark);
    color: var(--text-on-primary);
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 20px;
    margin-top: 10px;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.post-link-button:hover {
    background-color: var(--accent);
    color: var(--text-on-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}


@media screen and (max-width: 960px) {
    .post-container {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .facebook-iframe, 
    .post-container iframe {
        width: 100%;
        height: 650px;
    }
    
    .post-placeholder {
        width: 85%;
    }
    
    .iframe-link-container {
        width: 100%;
    }
}

@media screen and (max-width: 768px) {
    .facebook-iframe,
    .post-container iframe {
        height: 600px;
    }
    
    .facebook-post {
        padding: 15px;
    }
}

@media screen and (max-width: 480px) {
    .facebook-iframe,
    .post-container iframe {
        height: 550px;
    }
    
    .facebook-post h3 {
        font-size: 1.1rem;
    }
    
    .post-placeholder {
        min-height: 150px;
        padding: 15px;
        font-size: 0.9rem;
    }
    
    .post-link-button {
        padding: 6px 12px;
        font-size: 0.8rem;
        width: 85%;
    }
}

@media screen and (max-width: 360px) {
    .facebook-iframe,
    .post-container iframe {
        height: 500px;
    }
    
    .facebook-post {
        padding: 10px;
    }
    
    .post-container {
        margin: 10px 0;
    }
}

