header {
    display: block;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #1a202c, #2d3748);
    color: #e2e8f0;
}

#backgroundCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.container {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 3rem;
    z-index: 1;
}

.header-section {
    width: 25%;
    text-align: left;
    padding-right: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    margin-left: auto;
    margin-right: 2rem;
}

.header-section h1 {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.header-section p {
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
}


.hexagon-wrapper.diagram {
    position: relative;
    width: 65%; 
    max-width: 1400px;
    height: 950px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 2rem; 
    margin-right: auto;
}


.hexagon {
    position: absolute;
    width: 240px;
    height: 220px;
    background-color: #2a3340;
    clip-path: polygon(50% 0%, 90% 20%, 100% 60%, 75% 100%, 25% 100%, 0% 60%, 10% 20%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    transition:
        transform 0.5s ease-in-out,
        box-shadow 0.5s ease-in-out,
        background-color 0.5s ease-in-out,
        border 0.5s ease-in-out;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    animation: float 6s ease-in-out infinite;
    z-index: 2; 
}

.hexagon:hover {
    transform: scale(1.5);
    background-color: #3a3f4c;
    box-shadow:
        0 0 30px rgba(0, 0, 0, 0.7),
        0 0 40px rgba(66, 153, 225, 0.4);
    z-index: 10;
}

.hexagon.center {
    background-color: #b32348;
    box-shadow:
        0 0 50px rgba(229, 62, 62, 1),
        0 0 100px rgba(229, 62, 62, 0.8);
    animation: pulse 2s infinite alternate, float 6s ease-in-out infinite;
    width: 240px;
    height: 220px;
    z-index: 5;
}
 .hexagon.center:hover {
        background-color: #d4395b; 
        box-shadow:
            0 0 60px rgba(229, 62, 62, 1),
            0 0 120px rgba(229, 62, 62, 0.9); 
    }

.child-hexagon {
    width: 180px;
    height: 165px;
    background-color: #3b4252;
    font-size: 0.7em;
}

.child-hexagon:hover {
    background-color: #4c566a; 
    box-shadow:
        0 0 25px rgba(0, 0, 0, 0.6),
        0 0 35px rgba(135, 206, 250, 0.5); 
}


.hexagon-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #cbd5e0;
}

.hexagon.center .hexagon-title {
    color: #fff;
    font-size: 1.3rem;
}

.hexagon-description {
    font-size: 0.9rem;
    color: #a0aec0;
}

.hexagon.center .hexagon-description {
    color: #f7fafc;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 20px rgba(229, 62, 62, 0.6), 0 0 40px rgba(229, 62, 62, 0.4);
    }

    100% {
        box-shadow: 0 0 30px rgba(229, 62, 62, 0.8), 0 0 60px rgba(229, 62, 62, 0.6);
    }
}

#ecosystemCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .header-section,
    .hexagon-wrapper.diagram {
        width: 100%;
        padding-right: 0;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .header-section {
        margin-bottom: 2rem;
        align-items: center;
    }

    .hexagon-wrapper.diagram {
        height: 765px; 
    }

    .hexagon {
        width: 83.52px; 
        height: 76.82px; 
    }

    .hexagon.center {
        width: 88.74px; 
        height: 81.60px; 
    }

    .child-hexagon {
        width: 59.82px; 
        height: 55.03px; 
        font-size: 0.42em; 
    }

    .child-hexagon .hexagon-description {
        display: none;
    }

    .hexagon-title {
        font-size: 0.51rem;
    }

    .hexagon-description {
        font-size: 0.41rem; 
    }

    .hexagon.center .hexagon-title {
        font-size: 0.78rem;
    }

    .hexagon.center .hexagon-description {
        font-size: 0.54rem; 
    }

    footer {
        padding: 1rem 0;
    }

    footer .icons i {
        font-size: 1.4em; 
    }

    footer .copyright {
        font-size: 0.6rem; 
    }
}