/* Reset i podstawowe style */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #374151;
    background: #667eea;
    min-height: 100vh;
}

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

/* Nagłówek */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.header-content {
    text-align: center;
    flex: 1;
}

.header-image {
    width: 200px;
    height: 150px;
    object-fit: contain;
    border-radius: 8px;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-image:hover {
    transform: translate3d(0, 0, 0) scale3d(1.13, 1.13, 1);
}

.header-image-1 {
    order: 1;
}

.header-content {
    order: 2;
}

.header-image-2 {
    order: 3;
}

.main-title {
    font-size: 3rem;
    font-weight: 800;
    color: #374151;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.25rem;
    color: #6b7280;
    font-weight: 500;
}

/* Karty sekcji */
.card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

/* Tytuły sekcji */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
    border-bottom: 3px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.subsection-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    margin: 1.5rem 0 1rem 0;
}

/* Tekst */
.text {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: #4b5563;
}

.text.emphasis {
    font-weight: 600;
    font-size: 1.2rem;
    color: #1f2937;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.conclusion {
    font-weight: 600;
    color: #1f2937;
    font-style: italic;
}

/* Linki */
.link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
    will-change: background-color, color;
}

.link:hover {
    background: #667eea;
    color: white;
    text-decoration: none;
}

/* Warstwy skał */
.rock-layers {
    margin: 2rem 0;
}

.layer-card {
    padding: 1.5rem;
    margin: 1rem 0;
    border-radius: 8px;
    border-left: 6px solid;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}


.crystal {
    background: #fee2e2;
    border-left-color: #dc2626;
}

.paleozoic {
    background: #dcfce7;
    border-left-color: #22c55e;
}

.mesozoic {
    background: #dbeafe;
    border-left-color: #2563eb;
}

.cenozoic {
    background: #fef3c7;
    border-left-color: #eab308;
}

.layer-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.layer-desc {
    font-size: 1rem;
    color: #4b5563;
    line-height: 1.6;
}

/* Ramka z wyróżnieniem */
.highlight-box {
    background: #fef3c7;
    border: 2px solid #f59e0b;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.highlight-text {
    font-size: 1.1rem;
    color: #92400e;
    margin: 0;
}

/* Informacja o głębokości */
.depth-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #ede9fe;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border: 2px solid #8b5cf6;
}

.depth-number {
    font-size: 3rem;
    font-weight: 900;
    color: #7c3aed;
}

.depth-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #5b21b6;
    margin: 0;
}

/* Linia czasu */
.timeline-box {
    background: #f0f9ff;
    border: 2px solid #0ea5e9;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.timeline-list {
    list-style: none;
    padding: 0;
}

.timeline-list li {
    font-size: 1.1rem;
    color: #0c4a6e;
    margin: 0.8rem 0;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
}

/* Sekcja linków */
.links-section {
    margin: 2rem 0;
}

.link-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.link-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: border-color 0.2s ease, background-color 0.2s ease;
    will-change: border-color, background-color;
}

.link-card:hover {
    border-color: #667eea;
    background: #eef2ff;
}

.link-card h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.link-card p {
    font-size: 1rem;
    margin: 0;
    opacity: 0.8;
}

.model-image {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
    border-radius: 6px;
    margin: 0.8rem 0;
}

/* Funkcje */
.features-box {
    background: #f0fdf4;
    border: 2px solid #22c55e;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    font-size: 1.1rem;
    color: #15803d;
    margin: 1rem 0;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
}

/* Sekcja PIG */
.pig-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 2rem;
}

.pig-title-section {
    flex: 1;
}

.pig-logo-section {
    flex-shrink: 0;
}

.pig-logo {
    max-height: 80px;
    max-width: 200px;
    height: auto;
    width: auto;
    transition: opacity 0.2s ease;
    will-change: opacity;
}

.pig-logo:hover {
    opacity: 0.8;
}

/* Zadania Instytutu */
.tasks-grid {
    margin: 2rem 0;
}

/* Sekcja kariery */
.career-box {
    background: #f0f9ff;
    border: 2px solid #0ea5e9;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.career-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1rem 0;
}

.career-image {
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.task-cards {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    margin: 1rem 0;
}

@media (min-width: 769px) {
    .task-cards .task-card:nth-child(1) {
        grid-column: 1 / 3;
    }

    .task-cards .task-card:nth-child(2) {
        grid-column: 3 / 5;
    }

    .task-cards .task-card:nth-child(3) {
        grid-column: 5 / 7;
    }

    .task-cards .task-card:nth-child(4) {
        grid-column: 2 / 4;
    }

    .task-cards .task-card:nth-child(5) {
        grid-column: 4 / 6;
    }
}

.task-card {
    background: #fefce8;
    border: 2px solid #eab308;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.task-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 1rem;
}

.task-icon img {
    transition: transform 0.3s ease;
    will-change: transform;
}

.task-card:hover .task-icon img {
    transform: scale3d(1.3, 1.3, 1);
}

.task-card p {
    font-size: 1rem;
    color: #a16207;
    font-weight: 600;
    margin: 0;
}

/* Stopka */
.footer {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.footer-text {
    font-size: 1rem;
    color: #6b7280;
    font-weight: 500;
    margin: 0;
}

.footer-logos {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.footer-logo {
    text-align: center;
}

.pgi-logo-img {
    max-width: 74px;
    height: auto;
}

.funding-logo-img {
    max-width: 300px;
    height: auto;
}

.pgi-logo a {
    display: inline-block;
    transition: transform 0.2s ease;
}

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

.funding-logo a {
    display: inline-block;
    transition: transform 0.2s ease;
}

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

/* Responsywność */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .header-image-1 {
        order: 1;
    }
    
    .header-content {
        order: 2;
    }
    
    .header-image-2 {
        order: 3;
    }
    
    .header-image {
        width: 180px;
        height: 120px;
        align-self: center;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .depth-info {
        flex-direction: column;
        text-align: center;
    }
    
    .depth-number {
        font-size: 2.5rem;
    }
    
    .link-cards {
        grid-template-columns: 1fr;
    }
    
    .task-cards {
        grid-template-columns: 1fr;
        justify-items: stretch;
    }
    
    .task-cards .task-card {
        grid-column: auto;
    }
    
    .career-images {
        grid-template-columns: 1fr;
    }
    
    .pig-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .pig-logo {
        max-height: 60px;
    }
    
    .footer-logos {
        flex-direction: column;
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    .pgi-logo-img {
        max-width: 59px;
        height: auto;
    }
    
    .funding-logo-img {
        max-width: 250px;
        height: auto;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.8rem;
    }
    
    .text {
        font-size: 1rem;
    }
    
    .layer-card, .task-card, .link-card {
        padding: 1rem;
    }
}

/* Flexbox wyrównanie dla wszystkich elementów z ikonami */
.section-title,
.subsection-title,
.link-card h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-list li,
.features-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title img,
.subsection-title img,
.timeline-list li img,
.features-list li img,
.link-card h4 img,
.task-icon img {
    flex-shrink: 0;
}

/* Dodatkowe style dla lepszej dostępności */
:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}
