body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.home-page {
    background-color: #000;
}

#bg-video,
#bg-video-mobile {
    position: fixed;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
    z-index: -2;
    object-fit: cover;
}

#bg-video-mobile {
    display: none;
}

.home-page::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
}


header {
    background-color: #ffffff;
    border-bottom: 3px solid #2E7D32;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1000;
}

.home-page header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #2E7D32;
    font-size: 24px;
    font-weight: bold;
}

.home-page .logo {
    color: #4CAF50;
    font-size: 26px;
    text-shadow: 0 0 15px rgba(76, 175, 80, 0.3);
}

.logo img {
    height: 60px;
    margin-right: 10px;
}

nav a {
    text-decoration: none;
    color: #555;
    margin-left: 20px;
    font-weight: 500;
    font-size: 16px;
    transition: color 0.3s;
}

nav a:hover,
nav a.active {
    color: #2E7D32;
}

.home-page nav a {
    color: #eee;
    transition: all 0.3s;
}

.home-page nav a:hover,
.home-page nav a.active {
    color: #4CAF50;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

/* Styl hamburgera */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: #2E7D32;
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

.home-page .menu-toggle span {
    background-color: #fff;
}

/* Animacja hamburgera */
.menu-toggle.open span:nth-child(1) {
    transform: rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.menu-toggle.open span:nth-child(3) {
    transform: rotate(-45deg);
}


main {
    flex: 1;
    width: 90%;
    max-width: 1000px;
    margin: 30px auto;
}

h1 {
    color: #2E7D32;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.2em;
}

@media (max-width: 600px) {
    h1 {
        font-size: 1.8em;
    }
}

.home-page h1 {
    color: #4CAF50;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.intro-text {
    text-align: center;
    font-size: 18px;
    color: #666;
    margin-bottom: 40px;
}


.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.card {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    display: block;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
}

.home-page .card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #fff;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: #2E7D32;
}

.home-page .card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.15);
    border-color: #4CAF50;
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 15px;
}

.card .desc {
    font-size: 0.9em;
    color: #666;
}

.home-page .card .desc {
    color: #ccc;
}

.card h3 {
    margin: 10px 0;
    color: #2E7D32;
    text-align: center;
}

.home-page .card h3 {
    color: #4CAF50;
}


.hero-section {
    background-color: #e8f5e9;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 40px;
}

.home-page .hero-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 60px 40px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.hero-btn {
    display: inline-block;
    background-color: #2E7D32;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 15px;
}

#trivia-section {
    background-color: #fff8e1;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #ffe0b2;
    margin-bottom: 40px;
}

.home-page #trivia-section {
    background: rgba(255, 248, 225, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}


.epoch-item {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    gap: 30px;
    align-items: start;
}

.epoch-item img {
    width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
}

.epoch-title.jura {
    color: #f39c12;
}

.epoch-title.kreda {
    color: #c0392b;
}


.contact-container {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: inherit;
}

.submit-btn {
    background-color: #2E7D32;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
}

.submit-btn:hover {
    background-color: #1b5e20;
}


footer {
    background-color: #333;
    color: #ddd;
    text-align: center;
    padding: 20px;
    margin-top: auto;
}




@media (max-width: 1024px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .epoch-item img {
        width: 250px;
    }
}


@media (max-width: 768px) {
    .header-container {
        flex-direction: row;
        justify-content: space-between;
        width: 95%;
    }

    #bg-video {
        display: none;
    }

    #bg-video-mobile {
        display: block;
    }

    .menu-toggle {
        display: flex;
    }

    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: white;
        padding: 20px;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
        z-index: 999;
        flex-direction: column;
        box-sizing: border-box;
        border-top: 1px solid #eee;
    }

    nav.nav-active {
        display: flex;
        animation: slideDown 0.3s ease-out forwards;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    nav a {
        margin: 8px 0;
        padding: 12px;
        background-color: #f8f9fa;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        display: block;
        margin-left: 0;
        color: #2E7D32;
        text-align: center;
    }

    .home-page nav {
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(15px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .home-page nav a {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: #fff;
    }

    .grid-container {
        grid-template-columns: 1fr;
    }

    .epoch-item {
        flex-direction: column;
    }

    .epoch-item img {
        width: 100%;
        height: auto;
        margin-bottom: 15px;
    }

    .logo {
        flex-direction: row;
        margin-bottom: 0;
    }

    .logo img {
        margin: 0 10px 0 0;
        height: 45px;
    }

    .logo span {
        font-size: 1.2em;
    }

    .hero-section {
        padding: 25px 15px;
    }

    .contact-container {
        padding: 25px 20px;
    }
}

.map-controls {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 25px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.slider-container {
    flex: 1;
    min-width: 250px;
}

.slider-container label {
    display: block;
    margin-bottom: 15px;
    color: #2E7D32;
    font-weight: 600;
    font-size: 1.1em;
}

#time-slider {
    width: 100%;
    cursor: pointer;
    accent-color: #2E7D32;
    height: 6px;
    border-radius: 5px;
}

#location {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(232, 245, 233, 0.6);
    backdrop-filter: blur(5px);
    border-radius: 12px;
    border-left: 6px solid #2E7D32;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    line-height: 1.6;
    transition: all 0.3s ease;
}

#location strong {
    color: #1b5e20;
}

.maps-container {
    margin-bottom: 40px;
}

.map-wrapper {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.map-wrapper h2 {
    color: #2E7D32;
    margin-bottom: 20px;
}

#static-map-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    background-color: #bbdefb;
    /* Jasny błękit jako ocean */
    aspect-ratio: 2 / 1;
}

#paleo-map-img {
    width: 100%;
    height: 100%;
    display: block;
    transition: opacity 0.4s ease-in-out;
    object-fit: cover;
}

#map-marker {
    position: absolute;
    width: 18px;
    height: 18px;
    background-color: #d32f2f;
    border: 3px solid white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px rgba(211, 47, 47, 0.6);
    display: none;
    z-index: 10;
    pointer-events: none;
    animation: markerPulse 2s infinite ease-out;
    transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1), top 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes markerPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.7);
        transform: translate(-50%, -50%) scale(1);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(211, 47, 47, 0);
        transform: translate(-50%, -50%) scale(1.1);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(211, 47, 47, 0);
        transform: translate(-50%, -50%) scale(1);
    }
}

@media (max-width: 768px) {
    .map-controls {
        padding: 15px;
        gap: 15px;
    }

    .hero-btn {
        width: auto;
        min-width: 200px;
    }

    .slider-container {
        min-width: 100%;
    }

    #location {
        padding: 15px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .map-wrapper {
        padding: 10px;
    }

    .map-wrapper h2 {
        font-size: 1.2em;
    }

    #static-map-container {
        aspect-ratio: 16 / 9;
    }
}