/* ==============================
   PODSTAWOWE STYLE I RESET
   ============================== */
/* Import czcionki Montserrat z Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

/* Resetowanie stylów */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ==============================
   NAGŁÓWEK I NAWIGACJA
   ============================== */
header {
    background-color: #000000;
    color: #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header nav {
    background-color: #000000;
    color: #ffffff;
}

/* Nowe style dla menu z logo */
.menu-with-logo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
}

.menu-with-logo .logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

/* Pulsing animation for logo */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.header-logo {
    height: 40px;
    width: auto;
    max-width: 200px;
    animation: pulse 2s infinite ease-in-out;
    transition: transform 0.3s ease;
}

.header-logo:hover {
    transform: scale(1.05);
}

.main-menu {
    display: flex;
    list-style: none;
    justify-content: center;
    padding: 0;
    margin: 0;
}

.main-menu li {
    margin: 0 15px;
}

.main-menu a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.main-menu a:hover {
    color: #cccccc;
}

/* EU Funding Banner - completely remove margins */
.eu-funding-container {
    background-color: #ffffff;
    padding: 15px 0;
    margin: 0 !important;
}

.eu-funding-banner {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Usunięcie starych stylów logo */
.logo-container {
    display: none;
}

/* ==============================
   SEKCJE TREŚCI
   ============================== */
.content-section {
    padding: 40px 0;
    margin-top: 0 !important;
    background-color: white;
}

.page-content {
    line-height: 1.8;
    font-size: 16px;
    color: #333;
    margin-top: 20px;
}

.page-content h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 25px;
    color: #222;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.page-content h2 {
    font-size: 28px;
    font-weight: 600;
    margin: 35px 0 20px;
    color: #333;
}

.page-content h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 25px 0 15px;
    color: #444;
}

.page-content h4, .page-content h5, .page-content h6 {
    font-weight: 600;
    margin: 20px 0 10px;
    color: #555;
}

.page-content p {
    margin-bottom: 20px;
}

.page-content a {
    color: #007bff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.page-content a:hover {
    border-bottom-color: #007bff;
}

.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 20px 0;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.page-content blockquote {
    margin: 25px 0;
    padding: 15px 25px;
    border-left: 4px solid #007bff;
    background-color: #f8f9fa;
    font-style: italic;
    color: #555;
    border-radius: 0 5px 5px 0;
}

.page-content ul, .page-content ol {
    margin: 20px 0 20px 25px;
}

.page-content li {
    margin-bottom: 10px;
}

.page-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
}

.page-content table th, .page-content table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
}

.page-content table th {
    background-color: #f5f5f5;
    font-weight: 600;
    text-align: left;
}

.page-content table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* ==============================
   SEKCJE GALERII I ZDJĘĆ
   ============================== */
.gallery-section {
    padding: 30px 0;
    margin-top: 0 !important;
    background-color: #f9f9f9;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    color: #333;
}

.gallery-container {
    position: relative;
    min-height: 500px;
    margin-bottom: 30px;
}

.gallery-item {
    position: absolute;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    background-color: white;
    transition: box-shadow 0.3s;
}

.gallery-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mozaika na stronie głównej */
.mosaic-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    grid-auto-rows: 250px;
    grid-gap: 15px;
    margin: 30px 0;
}

.mosaic-item {
    position: relative;
    overflow: hidden;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.mosaic-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Rozmiary kafelków */
.mosaic-item.tile-1x1 {
    grid-column: span 1;
    grid-row: span 1;
}

.mosaic-item.tile-2x1 {
    grid-column: span 2;
    grid-row: span 1;
}

.mosaic-item.tile-1x2 {
    grid-column: span 1;
    grid-row: span 2;
}

.mosaic-item.tile-2x2 {
    grid-column: span 2;
    grid-row: span 2;
}

.mosaic-image-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.mosaic-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.mosaic-item:hover img {
    transform: scale(1.05);
}

/* Style dla układu galerii w formie siatki */
.masonry-gallery {
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
}

.masonry-gallery .gallery-item {
    width: 31.33%;
    margin: 1%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    overflow: hidden;
    border-radius: 4px;
    background-color: white;
    transition: box-shadow 0.3s, transform 0.3s;
    position: relative;
}

.masonry-gallery .gallery-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transform: translateY(-3px);
}

.masonry-gallery .gallery-item.portrait {
    /* Style dla zdjęć pionowych */
    width: 23%;
}

.gallery-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

/* ==============================
   STOPKA
   ============================== */
footer {
    background-color: #000000;
    color: #ffffff;
    padding: 40px 0 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 30px;
}

.footer-logo, .footer-contact, .footer-social {
    flex: 1;
    min-width: 200px;
    margin-bottom: 20px;
}

.footer-logo-img {
    max-width: 150px;
    filter: brightness(0) invert(1);
}

.footer-contact h3, .footer-social h3 {
    margin-bottom: 15px;
    font-size: 18px;
}

/* Complete footer link styles */
.footer-contact a, 
.social-icon {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    margin-bottom: 8px;
}

.footer-contact a:hover, 
.social-icon:hover {
    color: #e0e0e0;
    text-decoration: none;
}

/* Style dla ikon social media */
.social-icon i {
    color: #ffffff;
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

/* Ensure email label and address stay on same line */
.footer-contact p a {
    display: inline;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Poprawienie kontrastu dla tekstu copyright */
.footer-copyright {
    color: #cccccc;
}

.footer-copyright p {
    margin: 0;
}

/* Remove EU funding bottom margins */
.eu-funding {
    margin-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 15px;
    font-size: 12px;
}

.eu-logos {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    align-items: center;
    justify-content: center;
}

.eu-logo {
    height: 100px;
    width: auto;
}

/* ==============================
   PANEL ADMINISTRACYJNY
   ============================== */
.admin-login {
    background-color: #f5f5f5;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-box {
    background-color: white;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.login-logo {
    text-align: center;
    margin-bottom: 20px;
}

.login-logo img {
    max-width: 180px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.btn, .btn-login {
    display: inline-block;
    background-color: #333;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
}

.btn:hover, .btn-login:hover {
    background-color: #555;
}

.btn-login {
    width: 100%;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}

.login-footer a {
    color: #666;
    text-decoration: none;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.message {
    background-color: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Panel administratora - Dashboard */
.admin-dashboard, .admin-gallery {
    padding: 30px 15px;
}

.admin-widgets {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.admin-widget {
    flex: 1;
    min-width: 250px;
    margin: 15px;
    padding: 20px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.admin-widget h3 {
    margin-bottom: 10px;
}

.admin-widget p {
    margin-bottom: 15px;
    color: #666;
}

/* Panel administratora - Galeria */
.gallery-actions, .gallery-editor {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.admin-gallery-container {
    position: relative;
    width: 100%;
    height: 600px;
    border: 1px solid #ddd;
    margin-top: 20px;
    background-color: #f9f9f9;
    overflow: auto;
}

.gallery-item-actions {
    position: absolute;
    bottom: 5px;
    right: 5px;
    display: flex;
}

.delete-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
}

/* Przyciski w panelu administracyjnym */
.btn-outline {
    background-color: transparent;
    color: #333;
    border: 1px solid #333;
}

.btn-outline:hover {
    background-color: #f5f5f5;
}

/* Nowe style dla wielokrotnego przesyłania plików */
.dropzone {
    border: 2px dashed #ccc;
    border-radius: 5px;
    padding: 25px;
    text-align: center;
    margin: 15px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dropzone.highlight {
    background-color: #f0f0f0;
    border-color: #007bff;
}

#file-list {
    margin-top: 10px;
}

#file-list .file-item {
    background-color: #f8f9fa;
    padding: 8px 12px;
    margin-bottom: 5px;
    border-radius: 3px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Panel administracyjny - naprawione menu */
.admin-header {
    background-color: #000000;
    color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    padding: 15px 0;
}

.admin-brand {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.admin-brand img {
    height: 40px;
    margin-right: 15px;
    filter: brightness(0) invert(1); /* Białe logo na czarnym tle */
}

.admin-brand span {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

.admin-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 15px;
}

.admin-menu li {
    margin-right: 15px;
    margin-bottom: 5px;
}

.admin-menu a {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    transition: background-color 0.3s;
}

.admin-menu a:hover {
    background-color: rgba(255,255,255,0.1);
}

.admin-menu a i {
    margin-right: 5px;
}

.admin-container {
    padding-top: 30px;
    padding-bottom: 30px;
    background-color: #f5f5f5;
}

/* Panel administracyjny - sortable gallery */
.admin-gallery-container .gallery-grid {
    width: 100%;
    min-height: 200px;
    position: relative;
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px dashed #ccc;
    border-radius: 5px;
}

.admin-gallery-container .gallery-item {
    cursor: grab;
    margin-bottom: 15px;
    border: 1px solid #ddd;
}

.admin-gallery-container .gallery-item.ui-sortable-helper {
    cursor: grabbing;
}

.sort-placeholder {
    border: 2px dashed #007bff;
    background-color: rgba(0,123,255,0.1);
    margin-bottom: 15px;
    border-radius: 4px;
}

.gallery-item .position-indicator {
    position: absolute;
    top: 5px;
    left: 5px;
    background-color: rgba(0,0,0,0.6);
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    z-index: 2;
}

/* ==============================
   MENU MOBILNE
   ============================== */
.mobile-menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 24px;
    z-index: 1000;
    padding: 5px;
}

.mobile-menu-toggle i {
    color: #ffffff;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    z-index: 9999;
    overflow-y: auto;
}

.mobile-menu.active {
    display: block;
    animation: slideIn 0.3s forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #000;
    background: none;
    border: none;
    padding: 10px;
    z-index: 10;
}

.mobile-menu ul {
    list-style: none;
    padding: 60px 20px 20px;
    margin: 0;
}

.mobile-menu ul li {
    margin-bottom: 15px;
    text-align: center;
}

.mobile-menu ul li a {
    display: block;
    font-size: 18px;
    padding: 12px 15px;
    color: #000;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid #eee;
    transition: all 0.2s;
}

.mobile-menu ul li a:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

/* ==============================
   MEDIA QUERIES
   ============================== */
/* Responsywność galerii */
@media (max-width: 992px) {
    .masonry-gallery .gallery-item {
        width: 48%;
        margin: 1%;
    }
    
    .masonry-gallery .gallery-item.portrait {
        width: 31.33%;
    }
    
    .mosaic-gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        grid-auto-rows: 200px;
    }
}

@media (max-width: 768px) {
    .header-logo {
        height: 35px;
        animation: pulse 2s infinite ease-in-out;
    }
    
    .main-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block !important;
    }
    
    .menu-with-logo {
        position: relative;
        justify-content: space-between;
    }
    
    .header-logo {
        height: 35px;
    }
    
    body.menu-open {
        overflow: hidden;
    }
    
    .mosaic-gallery {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .mosaic-item {
        width: 100% !important;
        height: auto !important;
    }
    
    .mosaic-item.portrait-image .mosaic-image-wrapper {
        height: auto;
        max-height: 500px;
    }
    
    .mosaic-item.landscape-image .mosaic-image-wrapper {
        height: 250px;
    }
    
    .mosaic-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .gallery-section {
        padding-top: 20px;
    }
    
    .masonry-gallery .gallery-item,
    .masonry-gallery .gallery-item.portrait {
        width: 98%;
        margin: 1%;
    }
    
    .gallery-item img {
        height: auto;
    }
    
    .admin-gallery-container {
        height: auto;
    }
}

@media (max-width: 576px) {
    .mosaic-gallery {
        gap: 10px;
    }
    
    .mosaic-item.landscape-image .mosaic-image-wrapper {
        height: 180px;
    }
    
    .section-title {
        font-size: 24px;
        margin-bottom: 15px;
    }
}
/* Logo mobilne */
@media (max-width: 480px) {
    .header-logo {
        height: 20px;
        max-width: 150px;
        animation: pulse 2s infinite ease-in-out;
    }
}

/* ==============================
   PAGE TRANSITION
   ============================== */
#page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0s ease-in-out, visibility 0s linear 0s;
}

#page-transition.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0s ease-in-out, visibility 0s linear 0s;
}

.transition-logo {
    text-align: center;
    animation: logoAppear 1s ease-in-out;
}

.transition-logo img {
    max-width: 800px; /* Increased from 300px to make it 100% larger */
    width: 80%;
    height: auto;
}

@keyframes logoAppear {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 1;
        transform: scale(1.1); /* Increased scale for emphasis */
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}
