@import url("ffstyle.css");

html {
	scroll-behavior: smooth;
}

.snap-container {
	scroll-snap-type: y mandatory;
    height: 100vh; /* Fallback for older browsers */
    height: 100dvh; /* Dynamic Viewport Height */
    overflow-y: scroll;
    overflow-x: hidden;
    position: relative;
}

.section {
	scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    width: 100%;
    min-height: 100vh; /* Fallback */
    min-height: 100dvh; /* Ensures the section fits exactly in the viewable area */
    overflow: hidden;
    
    /* Add padding for the physical home indicator/nav bar on mobile */
    padding-bottom: calc(2vh + env(safe-area-inset-bottom));
}

.parallax-bg {
	position: absolute;
	top: -20%;
	left: 0;
	width: 100%;
	height: 160%;
	background-size: cover;
	background-position: center;
	z-index: -1;
	will-change: transform;
}

.bg-hero {
	display: flex;
	align-items: center;
	justify-content: center;
}

.bg-about {
	background-image: url('../../images/home-about.jpg');
	background-size: cover;
	background-position: center;
	padding: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
}

.bg-curriculum {
	background-color: #2daa4b;
	display: flex;
	align-items: center;
}

.curriculum-grid {
	display: grid;
	width: 100%;
	grid-template-columns: repeat(3, 1fr);
	border-collapse: collapse;
}

.grid-item {
	padding: 2rem;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.bg-programme {
	background-image: url('../../images/home-programme.jpg');
	background-size: 100%;
	background-position: center top;
	background-repeat: no-repeat;
	padding: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
}

.programme-card {
	background-color: #f05b32;
	border-radius: 50px 50px 0 0;
	padding-top: 3rem;
}

.programme-grid {
	display: grid;
	width: 100%;
	align-items: center;
	justify-items: center;
	grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
	gap: 0.5rem;
}

.programme-grid .grid-item {
	border: none !important;
	padding: 0;
}

.programme-grid img {
	max-width: 100%;
	height: 80px;
	object-fit: contain;
}

.programme-separator {
	width: 60px;
	height: 0;
	border-bottom: 10px dotted #ffc300;
	border-image: url(../../images/border-yellow.png) 30 round;
	display: block;
}

.bg-stories {
	background-color: var(--ff-light-blue);
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding-bottom: 0 !important;
}

.stories-text-area {
	flex-grow: 1;
	display: flex;
	align-items: center;
}

.story-img {
	width: 100%;
	height: 60vh;
	object-fit: cover;
	display: block;
}

.bg-enrolnow {
	background-color: var(--ff-light-yellow);
	min-height: auto !important;
	height: auto !important;
	/* scroll-snap-align: end !important; */
	/* scroll-snap-stop: normal !important; */
	position: relative;
	padding-bottom: 0 !important;
	display: block;
	padding-bottom: 15vh;
}

.enrol-bg-img {
	width: 100%;
	height: 60vh;
	display: block;
	object-fit: cover;
}

.enrol-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	z-index: 2;
}

.myVideo {
	max-width: 94%;
}

.myVideo2 {
	max-width: 100%;
}

@media (min-width: 992px) {
	.hero-middle-text {
		margin-top: 18vh;
	}

	.curriculum-grid {
		grid-template-columns: repeat(3, 1fr); /* 3 columns */
	}

	.grid-item {
		border: var(--ff-border-width) var(--ff-border-style) var(--ff-border-color);
		border-image: url(../../images/border-yellow.png) 30 round;
	}

	.grid-item:nth-child(1),
	.grid-item:nth-child(2) {
		border-top: none;
		border-right: none;
	}

	.grid-item:nth-child(3) {
		border-top: none;
	}

	.grid-item:nth-child(4),
	.grid-item:nth-child(5) {
		border-top: none;
		border-bottom: none;
		border-right: none;
	}

	.grid-item:nth-child(6) {
		border-top: none;
		border-bottom: none;
	}

	.bg-programme h2 {
		padding-right: 4rem;
	}
}

@media (max-width: 991px) and (min-width: 769px) {
	.curriculum-grid {
		grid-template-columns: repeat(2, 1fr); /* 2 columns */
	}

	.grid-item {
		border: var(--ff-border-width) var(--ff-border-style) var(--ff-border-color);
		border-top: none !important;
		border-image: url(../../images/border-yellow.png) 30 round;
	}

	.grid-item:nth-child(1),
	.grid-item:nth-child(3) {
		border-right: none;
	}

	.grid-item:nth-child(5) {
		border-bottom: none;
		border-right: none;
	}

	.grid-item:nth-child(6) {
		border-bottom: none;
	}

	.programme-separator {
		width: 100px;
	}
}

@media (max-width: 768px) {
	.parallax-bg {
		top: -20%;
		height: 130%;
	}

	.curriculum-grid {
		grid-template-columns: 1fr;
	}

	.curriculum-grid .grid-item {
		border: var(--ff-border-width) var(--ff-border-style) var(--ff-border-color);
		border-top: none !important;
		border-image: url(../../images/border-yellow.png) 30 round;
	}

	.curriculum-grid .grid-item:last-child {
		border-bottom: none;
	}

	.hide-mobile {
		display: none !important;
	}

	.programme-card {
		margin-top: 20vh;
		padding-bottom: 15vh !important;
	}

	.programme-grid {
		grid-template-columns: 1fr auto 1fr; /* 3 Columns */
		gap: 1rem;
		row-gap: 0;
	}

	.programme-grid .grid-item:nth-child(-n+3) {
		order: 1;
	}

	.programme-grid .grid-item:nth-child(n+8):nth-child(-n+10) {
		order: 2;
	}

	.programme-grid .grid-item:nth-child(11) {
		display: flex !important;
		order: 2;
		grid-column: 1 / -1;
		margin: 2rem 0;
		padding-top: 3rem;
	}

	.programme-grid .grid-item:nth-child(11) .programme-separator {
		transform: rotate(130deg);
	}

	.programme-grid .grid-item:nth-child(n+5):nth-child(-n+7) {
		order: 3;
	}

	.programme-grid .grid-item:nth-child(n+12) {
		order: 4;
	}

	.programme-separator {
		transform: none;
		width: 120px;
	}

	.story-img {
		height: 40vh
	}

    .footer-card {
        padding-bottom: calc(3rem + env(safe-area-inset-bottom)) !important;
    }
}

@media (max-height: 580px) and (orientation: landscape) {
    .bg-hero {
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: center !important;
        padding: 0 !important;
    }
	
    .bg-hero .position-absolute.top-0 {
        margin-top: 20px !important;
    }
	
    .bg-hero .hero-middle-text {
        margin-top: auto !important;
		margin-bottom: auto !important;
    }
	
    .bg-hero .position-absolute.bottom-0 {
        margin-bottom: 20px !important;
		padding-bottom: 0px !important;
    }

    .myVideo, .bg-hero img {
        max-width: 380px !important; /* Scale down the firefly animation */
        height: auto !important;
    }
}

/* ===============================================
	POPUP MODAL VIEW
=============================================== */
.modal-content {
	background-color: var(--ff-light-yellow) !important; 
    border-radius: 30px; 
    border: none; 
    overflow: hidden; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-header {
    background-color: var(--ff-light-yellow); 
    border-bottom: none;
    position: relative; 
    justify-content: center; 
    padding: 1.5rem 1rem;
    height: 100px;
}

.modal-logo {
    height: 50px; 
    width: auto;
    object-fit: contain;
}

.modal-header .btn-close {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-body {
    background-image: url('../../images/modal-background.jpg');
    background-size: cover;    
    background-position: center;
    background-repeat: no-repeat;
    min-height: 400px; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
	border-radius: 50px 50px 0 0; 
}