@font-face {
    font-family: 'Blinker';
    src: url('https://static.igem.wiki/teams/5836/fonts/blinker/blinker-regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Raleway';
    src: url('https://static.igem.wiki/teams/5836/fonts/raleway/raleway-regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nixie One';
    src: url('') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Fraunces';
    src: url('https://static.igem.wiki/teams/5836/fonts/fraunces/fraunces-72pt-regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Dark blue background for the entire page */
body {
    background-color: #0b1320 !important;
}

/* Alternative: If the above doesn't work, target the page content wrapper */
#page_content {
    background-color: #0b1320 !important;
}

/* Also ensure the main container has the dark blue background */
.main-content,
.container-fluid,
main {
    background-color: #0b1320 !important;
}

/* Make sure the attributions hero section blends seamlessly */
.attributions-hero {
    background-color: #0b1320;
    min-height: 60vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

/* Attributions Hero Section */
.attributions-hero {
    background-color: #0b1320;
    min-height: 60vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0;
    margin-top: -20px; /* Remove gap below navbar */
    padding-top: 20px; /* Add padding to maintain spacing */
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.puzzle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.puzzle-image {
    width: 380px; 
    height: auto;
    opacity: 0.7;
    position: absolute;
    animation: float 6s ease-in-out infinite;
}

.puzzle-container .puzzle-image:first-child {
    top: 10%; /* Moved higher from 20% */
    left: 15%;
    animation-delay: 0s;
}

.puzzle-container .puzzle-image:last-child {
    top: 10%; /* Moved higher from 45% */
    right: 15%;
    animation-delay: 3s; /* Half of 6s for offset */
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px); 
    }
    50% { 
        transform: translateY(-15px); /* Reduced movement from -30px */
    }
}

/* Desktop specific adjustments for puzzle pieces */
@media (min-width: 769px) {
    .puzzle-image {
        width: 380px; /* Smaller size for desktop */
        opacity: 0.7;
        animation: float 6s ease-in-out infinite;
    }
    
    .puzzle-container .puzzle-image:first-child {
        top: 10%; /* Higher position */
        left: 15%;
        animation-delay: 0s;
    }

    .puzzle-container .puzzle-image:last-child {
        top: 10%; /* Higher position */
        right: 15%;
        animation-delay: 3s;
    }
    
    @keyframes float {
        0%, 100% { 
            transform: translateY(0px); 
        }
        50% { 
            transform: translateY(-15px); /* Reduced movement */
        }
    }
}

/* Responsive adjustments - BIGGER on all screens */
@media (max-width: 768px) {
    .puzzle-image {
        width: 150px !important; /* Set to 150px */
        opacity: 0.6;
        animation: float 6s ease-in-out infinite;
    }
    
    .attributions-hero {
        min-height: 45vh; /* Reduced from 60vh */
    }
    
    /* Keep original mobile float animation */
    @keyframes float {
        0%, 100% { 
            transform: translateY(0px); 
        }
        50% { 
            transform: translateY(-20px); /* Original mobile movement */
        }
    }
}

@media (max-width: 480px) {
    .puzzle-image {
        width: 150px !important; /* Set to 150px */
        opacity: 0.6;
        animation: float 6s ease-in-out infinite;
    }

    .puzzle-container .puzzle-image:first-child {
        top: 10% !important;
        left: 15% !important;
    }

    .puzzle-container .puzzle-image:last-child {
        top: auto !important; /* Reset top positioning */
        bottom: 5% !important; /* Lower from 10% to 5% */
        right: 5% !important; /* More to the right from 15% to 5% */
    }

    .attributions-hero {
        min-height: 40vh; /* Even shorter on mobile */
    }
}

@media (max-width: 390px) {
    .puzzle-image {
        width: 150px !important; /* Set to 150px */
        opacity: 0.6;
        animation: float 6s ease-in-out infinite;
    }
    
    .puzzle-container .puzzle-image:first-child {
        top: 10% !important;
        left: 15% !important;
    }

    .puzzle-container .puzzle-image:last-child {
        top: auto !important; /* Reset top positioning */
        bottom: 3% !important; /* Even lower for very small screens */
        right: 3% !important; /* Even more to the right for very small screens */
    }
}

.hero-content {
    z-index: 2;
    text-align: center;
    position: relative;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 8rem);
    font-weight: bold;
    color: #d7af6b;
    margin: 0;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.9);
    letter-spacing: 0.05em;
    font-family: 'Fraunces', serif;
    line-height: 1.1;
    text-align: center;
    display: block;
}

.wave-text {
    font-family: 'Blinker', serif;
}

/* Wave Section */
.wave-transition {
    width: 100vw;
    height: 200px;
    position: relative;
    overflow: hidden;
    margin-left: calc(-50vw + 50%);
    margin: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    vertical-align: top;
}

.wave-transition svg {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

/* Extended Blue Background - now with gradient */
.blue-background {
    background: linear-gradient(to bottom, #0b1320 50%, #6e0d25 50%);
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    position: relative;
    padding: 0;
    margin-top: 0;
    margin-bottom: 0;
}

/* Red Wavy Overlay */
.red-wavy-overlay {
    position: relative;
    width: 100%;
    margin: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
}

.wave-top, .wave-bottom {
    width: 100%;
    height: 150px;
    display: block;
    margin: 0; /* Remove all margins */
    padding: 0; /* Remove all padding */
}

.wave-top {
    margin-bottom: -1px;
}

 .wave-bottom {
    margin-top: 0;  /* Changed from -1px */
}

/* Thank You Section */
.thank-you-section {
    background-color: #6e0d25;
    padding: 4rem 0; /* Restore the original padding */
    text-align: center;
    margin: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    position: relative;
}

.thank-you-section::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    width: calc(100% + 6px);
    height: calc(100% + 10px); /* Extend downward more */
    background-color: #6e0d25;
    z-index: -1;
}

.thank-you-section::after {
    content: '';
    position: absolute;
    bottom: -5px; /* Position just below the thank you section */
    left: 0;
    width: 100%;
    height: 10px; /* Thin red stripe */
    background-color: #6e0d25;
    z-index: 1;
}

.thank-you-section .container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.thank-you-title {
    font-size: 3rem;
    font-weight: bold;
    color: #d7af6b;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.thank-you-message {
    font-size: 1.5rem;
    color: white;
    margin: 0;
    opacity: 0.9;
    font-family: 'Nixie One', serif !important; /* Changed to Nixie One font */
    text-align: center; /* Center align the text */
    word-wrap: break-word; /* Allow long words to break */
    line-height: 1.6; /* Better line spacing for readability */
    max-width: 100%; /* Ensure it doesn't overflow the container */
}

/* Yellow Section */
.yellow-section {
    background-color: #d7af6b;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 2rem 0;
    margin-top: -10px; /* Pull up to overlap with wave */
    padding-top: 2.5rem; /* Compensate for negative margin */
}

/* Fix for iframe section */
.row.mt-4 {
    margin: 0;
    padding: 0;
}

/* Yellow background to eliminate line between bottom wave and iframe - BIGGER */
.wave-transition:last-child::after {
    content: '';
    position: absolute;
    bottom: -8px; /* Position further below the bottom wave */
    left: 0;
    width: 100%;
    height: 16px; /* Thicker yellow stripe */
    background-color: #d7af6b;
    z-index: 1;
}

/* Mobile specific adjustments - BIGGER stripes */
@media (max-width: 768px) {
    .wave-transition:last-child::after {
        bottom: -6px;
        height: 12px; /* Bigger stripe on mobile */
    }
    
    /* Make "THANK YOU" longer on tablets */
    .wave-transition text {
        font-size: 50px !important;
        letter-spacing: 4px !important; /* Increased from 2px */
    }
}

@media (max-width: 480px) {
    .wave-transition:last-child::after {
        bottom: -4px;
        height: 10px; /* Bigger stripe on small mobile */
    }
    
    .yellow-section {
        margin-top: -10px;
        padding-top: 2.6rem;
    }
    
    /* Make "THANK YOU" much longer on phones */
    .wave-transition text {
        font-size: 60px !important; /* Increased from 50px */
        letter-spacing: 8px !important; /* Increased from 3px */
    }
}

@media (max-width: 390px) {
    .wave-transition:last-child::after {
        bottom: -3px;
        height: 8px; /* Bigger stripe on very small screens */
    }
    
    .yellow-section {
        margin-top: -8px;
        padding-top: 2.4rem;
    }
    
    /* Make "THANK YOU" longest on very small screens */
    .wave-transition text {
        font-size: 62px !important; /* Increased from 55px */
        letter-spacing: 8px !important; /* Increased from 4px */
        font-stretch: expanded !important;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
        letter-spacing: 2px;
    }

    .thank-you-title {
        font-size: 2rem;
    }

    .puzzle-image {
        width: 150px !important; /* Set to 150px */
        opacity: 0.6;
    }

    .wave-transition {
        height: 150px; /* Match original height */
        margin: 0;
        padding: 0;
    }

    .thank-you-section::before {
        top: -2px;
        left: -2px;
        width: calc(100% + 4px);
        height: calc(100% + 15px); /* Extend even more on mobile */
    }

    .thank-you-section::after {
        bottom: -3px;
        height: 8px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
        letter-spacing: 1px;
    }

    .thank-you-title {
        font-size: 1.5rem;
    }

    .thank-you-message {
        font-size: 1rem;
    }

    .puzzle-image {
        width: 150px !important; /* Set to 150px */
        opacity: 0.6;
    }

    .wave-transition {
        height: 150px; /* Keep consistent height */
        margin: 0;
        padding: 0;
    }

    .thank-you-section::before {
        top: -1px;
        left: -1px;
        width: calc(100% + 2px);
        height: calc(100% + 20px); /* Maximum extension on small screens */
    }

    .thank-you-section::after {
        bottom: -2px;
        height: 6px;
    }
}

@media (max-width: 390px) {
    .thank-you-section::after {
        bottom: -1px;
        height: 4px;
    }
}

/* Force zero margins on all wave and thank-you elements */
.thank-you-section {
    background-color: #6e0d25;
    padding: 4rem 0;
    text-align: center;
    margin: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    position: relative;
}

.wave-transition {
    width: 100vw;
    height: 200px;
    position: relative;
    overflow: hidden;
    margin-left: calc(-50vw + 50%);
    margin: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    vertical-align: top;
}

.red-wavy-overlay {
    position: relative;
    width: 100%;
    margin: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
}

/* Mobile specific zero margins */
@media (max-width: 768px) {
    .thank-you-section {
        margin: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
    
    .wave-transition {
        margin: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding: 0 !important;
        height: 150px;
    }
    
    .red-wavy-overlay {
        margin: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding: 0 !important;
    }
}

@media (max-width: 480px) {
    .thank-you-section {
        margin: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
    
    .wave-transition {
        margin: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding: 0 !important;
        height: 150px;
    }
    
    .red-wavy-overlay {
        margin: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding: 0 !important;
    }
}

/* Responsive wave text */
.wave-transition text {
    font-size: clamp(25px, 8vw, 50px) !important; /* Scales with viewport width */
    letter-spacing: clamp(8px, 3vw, 15px) !important; /* Scales with viewport width */
    font-weight: bold !important;
    font-stretch: expanded !important;
    font-family: 'Blinker', sans-serif !important; /* Apply Blinker font to THANK YOU */
}

.wave-transition textPath {
    text-anchor: start !important;
}

/* Red background section to eliminate border lines */
.red-background-cover {
    position: absolute;
    top: 190px; /* Position it to start just above the thank-you section */
    left: -5px;
    width: calc(100vw + 10px);
    height: calc(4rem + 20px); /* Increase height to cover more area */
    background-color: #6e0d25;
    z-index: 0;
    margin-left: calc(-50vw + 50% - 5px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .red-background-cover {
        top: 145px; /* Position closer to the thank-you section */
        height: calc(4rem + 25px); /* Extend below the section */
    }
}

@media (max-width: 480px) {
    .red-background-cover {
        top: 145px; /* Position closer to the thank-you section */
        height: calc(4rem + 30px); /* Extend further below on small screens */
    }
}

/* Extra small screens (320px and below) */
@media (max-width: 360px) {
    .red-background-cover {
        top: 135px; /* Position even closer */
        height: calc(4rem + 40px); /* Maximum extension for very small screens */
    }
}

/* Mobile adjustments for thank-you section background */
@media (max-width: 768px) {
    .thank-you-section::before {
        height: calc(100% + 30px); /* Extend even more downward on mobile */
    }
}

@media (max-width: 480px) {
    .thank-you-section::before {
        height: calc(100% + 35px); /* Maximum downward extension on small screens */
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .thank-you-section::before {
        height: calc(100% + 45px); /* Maximum extension for very small screens */
    }
}

/* Flipped SVG Section */
.flipped-svg {
    transform: rotate(180deg);
    transform-origin: center;
    display: block;
    width: 100%;
    height: 100%;
    background-color: #d7af6b
}

/* Add this NEW block for floating "THANK YOU" on wave */
.thank-you-floating {
    position: absolute;
    top: 10px; /* Adjust for vertical alignment on wave */
    left: 5%; /* Position on the left side */
    z-index: 3;
    text-align: left;
}

.thank-you-floating .thank-you-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #d7af6b;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
    margin: 0;
    font-family: 'Blinker', sans-serif !important; /* Apply Blinker font to floating THANK YOU */
}

/* Responsive adjustment for wave-floating title */
@media (max-width: 768px) {
    .thank-you-floating .thank-you-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .thank-you-floating .thank-you-title {
        font-size: 1.5rem;
    }
}

/* Initial hidden state for animations - elements start invisible on the left */
.hero-title {
    opacity: 0 !important;
    transform: translateX(-300px) !important;
    transition: none !important;
}

.wave-transition text {
    opacity: 0 !important;
    transform: translateX(-300px) !important;
    transition: none !important;
}

.thank-you-message {
    opacity: 0 !important;
    transform: translateX(-300px) !important;
    transition: none !important;
}

