html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.7;
    color: rgba(255,255,255,0.85);
    background: linear-gradient(aqua, blue);
}


header {
    position: relative;
    width: 100vw;
    height: 40vh;
    overflow: hidden;
    margin-bottom: -5px;
}

header img {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
}

h1 {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -30%);
    font-size: 3rem;
    background: linear-gradient(45deg, #7a8fa3, #b0c4de);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 15px rgb(206, 230, 255);
}


main {
    scroll-snap-type: y mandatory;
}

section {
    width: 100vw;
    height: 65vh;
    min-height: 600px;
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
    isolation: isolate;
}


section img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.85);
    z-index: 1;
}

.text {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    padding: 3rem;
    z-index: 4;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box; 
    background: linear-gradient(
        to right, 
        rgba(43, 10, 50, 0.95) 30%,
        rgba(50, 10, 40, 0.4) 70%,
        transparent
    );
}

.text h2, .text h3 {
    margin-left: 10%; 
    color: #b0c4de;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
}

.text h2 { font-size: 2.8rem; margin-bottom: 0.5rem; }
.text h3 { font-size: 1.2rem; margin-top: 1rem; margin-bottom: 0.2rem; }

.text a {
    position: relative;
    color: #7fffd4;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-left: 10%;
    max-width: 85%;
    word-break: break-all;
    display: inline-block;
}

section:nth-child(even) .text {
    left: auto;
    right: 0;
    align-items: flex-end; 
    text-align: right;
    background: linear-gradient(
        to left,
        rgba(42, 10, 50, 0.95) 30%,
        rgba(50, 10, 41, 0.4) 70%,
        transparent
    );
}

section:nth-child(even) .text h2, 
section:nth-child(even) .text h3,
section:nth-child(even) .text a {
    margin-left: 0;
    margin-right: 10%;
}

.text a:hover {
    color: #00ffff;
    transform: translateX(10px);
}

section:nth-child(even) .text a:hover {
    transform: translateX(-10px);
}



section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(50, 15, 10, 0.95);
    z-index: 3;
    transition: opacity 1s ease;
}

section:hover::before {
    opacity: 0;
}


@media (max-width: 1200px) {
    .text {
        width: 60%;
        padding: 2rem;
    }
    
    .text h2, .text h3, .text a {
        margin-left: 8%; 
    }

    section:nth-child(even) .text h2, 
    section:nth-child(even) .text h3,
    section:nth-child(even) .text a {
        margin-left: 0;
        margin-right: 8%;
    }

    .text h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    section {
        height: auto;
        min-height: 60vh;
    }

    .text {
        width: 100% !important;
        height: 100% !important;
        background: rgba(0, 0, 0, 0.6) !important; 
        align-items: center !important;
        text-align: center !important;
        padding: 1rem;
    }

    .text h2, .text h3, .text a {
        margin: 0.5rem 0 !important;
        max-width: 90%;
        left: 0 !important;
        padding: 0 !important;
    }
    
    .text h2 { font-size: 1.8rem; }
}