:root {
    --carousel-height: 270px;
}

body {
    background-color: #18157c;
}

/* Carousel Styling */

.carousel {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: calc(100vh - (var(--carousel-height) + var(--header-height)));
    flex-shrink: 0;
}

.carousel-image {
    width: 100%;
    display: block;
    object-fit: cover;
    height: 100%;
}

.carousel-inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-item {
    display: none;
    /* Hide all items by default */
    width: 100%;
}

.carousel-item.active {
    display: block;
    /* Only show the active item */
}

.carousel-caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 66px;
    text-align: center;
    white-space: nowrap;
    /* Keep the text in a single line */
    overflow: hidden;
    /* Hide the letters until they're animated */
}

.carousel-caption2 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 80px;
    text-align: center;
    white-space: nowrap;
    /* Keep the text in a single line */
    overflow: hidden;
    /* Hide the letters until they're animated */
}

/* CSS for the animation */
.letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(-100px);
    animation: fadeInUp 0.2s forwards;
}

/* Keyframes for the fadeInUp effect */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: #ffffff;
    text-decoration: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 20px;
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}


/* Link Boxes Styling */

.section-links-2 {
    display: flex;
    justify-content: space-around;
}

.section-links {
    display: flex;
    width: 100%;
    bottom: 0;
    height: 270px;
}

.link-box {
    width: 100%;
    padding: 20px;
    color: white;
    text-align: center;
    position: relative;
    text-decoration: none;
    transition: brightness 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    height: 230px;
    flex-direction: column;
}

.link-box:hover {
    filter: brightness(85%);
}

.link-title {
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
    pointer-events: none;
    text-align: left;
    max-width: 190px;
}



.fun-fact {
    position: absolute;
	top: 0;
	right: 0;
    padding: 15px;
    font-family: 'JustAnotherHand';
    color: white;
    text-align: end;
    border-radius: 8px;
    opacity: 0;
    transform: translateY(100%);
    transition: transform 0.5s ease, opacity 0.5s ease;
    text-shadow: 0px 0px 6px black;
    font-size: 28px;
    max-width: 340px;
}

.fun-fact.show {
    opacity: 1;
    transform: translateY(0);
}

.fun-fact.hide {
    opacity: 0;
    transform: translateY(100%);
}


.carousel-button {
    display: inline-block;
    padding: 8px 15px;
    background-color: #007bff;
    color: white;
    text-align: center;
    text-decoration: none;
    font-size: 28px;
    border-radius: 20px;
    transition: all 0.3s ease;
    box-shadow: 5px 8px #0056b3;
    border: none;
    position: absolute;
    bottom: 40px;
    z-index: 2;
}

.carousel-button:hover,
.carousel-button:focus {
    background-color: #0056b3;
    box-shadow: 0 0px #003366;
    transform: translateX(5px) translateY(8px);
}

.carousel-button:active {
    transform: translateX(5px) translateY(8px);
    box-shadow: 0 1px #003366;
}

.hor-when-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;  
}

@media (max-width: 1000px) {
    main {
        scrollbar-width: none;
    }
	.link-title {
		left: unset;
	}

	.carousel-button {
		font-size: 26px;
	}

	.carousel-caption,
	.carousel-caption2 {
		font-size: 60px;
	}

	.link-box {
		height: 170px;
        justify-content: space-around;
		align-items: center;
		padding: 0;
        flex-shrink: 0;
	}

    .link-title {
        max-width: unset;
    }

	.section-links {
		flex-direction: column;
		align-items: center;
		width: 100%;
	}

    .hor-when-mobile {
        flex-direction: row;
        gap: 3px;
    }
}


@media (max-width: 768px) {
    .carousel-button {
		padding: 7px 10px;
    }

    .carousel-control {
        display: none;
    }
}

@media (max-width: 600px) {
	.carousel-button {
		font-size: 20px;
	}
}

@media (max-width: 400px) {
	.carousel-caption,
	.carousel-caption2 {
		font-size: 36px;
	}

	.carousel-button {
		padding: 10px 14px;
		font-size: 18px;
	}
}


@media (max-height: 650px) {
	.link-box {
		min-height: 50px !important;
	}
}