@layer fonts{
    /* Lato Black Italic */
    @font-face {
        font-display: swap;
        font-family: 'Lato';
        font-style: normal;
        font-weight: 700;
        src: url('./assets/fonts/Lato-BlackItalic.ttf') format('ttf');
    }
    
    /* Montserrat Variable */
    @font-face {
        font-display: swap;
        font-family: 'Montserrat';
        font-style: normal;
        font-weight: 350;
        src: url('./assets/fonts/Montserrat-VariableFont_wght.ttf') format('ttf');
    }

    /* Poppins Regular */
    @font-face {
        font-display: swap;
        font-family: 'Poppins';
        font-style: normal;
        font-weight: 300;
        src: url('./assets/fonts/Poppins-Regular.ttf') format('ttf');
    }
    
    :root{
        --ff-mono: 'Space Mono', 'Courier New', Courier, monospace;
	    --fs-56: calc(56 / 16 * 1rem);
	    --fs-48: calc(48 / 16 * 1rem);
	    --fs-40: calc(40 / 16 * 1rem);
	    --fs-32: calc(32 / 16 * 1rem);
	    --fs-24: calc(24 / 16 * 1rem);
	    --fs-20: calc(20 / 16 * 1rem);
        --fs-15: calc(15 / 16 * 1rem);
        --fs-10: calc(10 / 16 * 1rem);
    }

    h1{
        font-size: var(--fs-40);
        letter-spacing: -2.5px;
    }

    h2{
        font-size: var(--fs-32);
        letter-spacing: -2.14px;
    }

    h3{
        font-size: var(--fs-20);
        letter-spacing: -0.89px;
    }

    h4{
        font-size: var(--fs-15);
        letter-spacing: -0.55px;
    }

    h5{
        font-size: var(--fs-10);
        letter-spacing: -0.30px;
    }
}

@layer global {
    *,
    *::before,
    *::after{
        box-sizing: border-box;
    }

    body {
        margin: 0;
        font-family: 'Poppins', sans-serif;
        font-size: var(--fs-15);
    }

    img {
        display: block;
        max-width: 100%;
        height: auto;
    }

    h1,
    h2,
    h3,
    p {
        text-wrap: balance;
    }

    h1,
    h2,
    h3 {
        font-family: var(--ff-mono);
        margin: 0;
        line-height: 1.1;
    }

    p{
        line-height: 1.6;
        margin: 0;
    }

    a {
        text-decoration: none;
    }

    header ul,
    footer ul {
        margin: 0;
        padding: 0;

        li {
            list-style-type: none;
        }
    }

    .visually-hidden{
        position: absolute;
        left: -10000px;
        top: auto;
        width: 1px;
        height: 1px;
        overflow: hidden;
    }
}

@layer layout { 
	.wrapper { 
		display: flex;
		flex-direction: column;
		align-items: center;
		width: 100%;

		/* Direct children default behavior (mimicking grid-column: 2) */
		> * { 
			flex-shrink: 0;
			width: calc(100% - 64px);

			@media (width >= calc(700 / 16 * 1rem)) { 
				width: min(calc(100% - 80px), calc(1100 / 16 * 1rem));
			}
		}

		/* Fullbleed children breakout (mimicking grid-column: 1/-1) */
		> .fullbleed { 
			width: 100%;
		}

		/* Small modifier behavior */
		&.small { 
			> * {
				@media (width >= calc(700 / 16 * 1rem)) and (width < calc(1000 / 16 * 1rem)) { 
					width: min(calc(100% - 200px), calc(1100 / 16 * 1rem));
				}
				/* Ensure fullbleed stays full size even inside .small */
				&.fullbleed {
					width: 100%;
				}
			}
		}

		/* Multi-column row behavior (.fd-col) */
		&.fd-col { 
			flex-direction: row;
			flex-wrap: wrap;
			justify-content: center; /* Keeps columns centered together */

			> * {
				/* Width of each item in a 3-column mobile layout */
				width: calc(calc(100% - 64px) / 3); 

				@media (width >= calc(700 / 16 * 1rem)) { 
					/* Width of each item in a 6-column layout */
					width: calc(calc(100% - 80px) / 6); 
				} 

				@media (width >= calc(1000 / 16 * 1rem)) { 
					/* Width of each item in a 12-column layout */
					width: calc(calc(1100 / 16 * 1rem) / 12); 
				} 

				&.fullbleed {
					width: 100%;
				}
			}
		} 
	} 
}

@layer button {
	.button {
		display: block;
		background: var(--c-yellow);
		width: fit-content;
		padding: 12px 38px;
		color: var(--c-xdark-navy);
		font-family: var(--ff-mono);
		border: 3px solid var(--c-yellow);
		transition: 150ms ease-in-out;
		transition-property: color, border-color, background-color;

		&:hover {
			background: transparent;
			border: 3px solid var(--c-xdark-navy);
		}

		&:hover-white {
			background: transparent;
			border: 3px solid var(--c-white);
		}
	}
}

@layer header {
  .header {
	  padding-block: 20px;
	  align-items: center;
  }
  .header {
  	.header-logo-link, 
  	.header-links {
  			grid-row: 1;		
  	}

	  .header-logo-link {
	  	z-index: 12;
	  	justify-self: center;
	  	width: calc(75 / 16 * 1rem);

	  	@media (width >= calc(700 / 16 * 1rem)){
	  		justify-self: start;
	  		width: calc(108 / 16 * 1rem);
	  	}

	  	&:hover path {
	  		fill: var(--c-xdark-navy);
	  	}
	  }
	  .header-links {
	  	justify-self: start;
	  	display: grid;
	  	align-items: center;

	  	@media (width >= calc(700 / 16 * 1rem)){
	  		padding-left: 167px;
	  		width: 100%;
	  	}
	  }
  }
}

@layer topnav {
	.topnav {
		z-index: 10;
        /*display: flex;
        justify-content: end;
        align-items: center;
        padding-block: 0.5rem;*/

        &::before{
  	        content: '';
  	        position: fixed;
  	        inset: 64px 0 0 0;
  	        background: var(--c-black-overlay);
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.5s ease-in-out;
        }

        &:has(.topnav__open[aria-expanded='true'])::before {
  	        opacity: 1;
        }
    }

    .topnav button {
	    /*display: block;*/
	    translate: 0 2px;
        background: none;
        border: none;
        padding: 0;

        @media (width >= calc(700 / 16 * 1rem)) {
            display: none;
        }
    }

    .topnav__open[aria-expanded='true'] {
	    display: none;

        + .topnav__menu .topnav__menu-content {
  	        opacity: 0;
            translate: 0; 

            @media (prefers-reduced-motion) {
                opacity: 1;
            }
        }

        + .topnav__menu-content::before{
	        opacity: 1;
        }

        + .topnav__menu .topnav__close {
	        display: block;
        }
    }

    .topnav__close {
        display: none;
        margin-inline-start: auto;
        margin-block-end: 8rem;
        position: absolute;
        top: 18px;
        /*translate: 0 -100%;*/

        img {
            width: 2.5rem;
        }
    }

    .topnav__menu-content {
        display: flex;
        justify-content: space-between;

        @media (width < calc(700 / 16 * 1rem)) {
            opacity: 0;
            flex-direction: column;
            position: fixed;
            inset: 64px 120px 0 0;
            padding: 64px 32px 24px;
            background-color: var(--c-xdark-navy);
            translate: -100vw 0;
            transition: translate 0.5s ease-in-out;
            transition-property: opacity;  
        }

        @media (width < calc(700 / 16 * 1rem)) and (prefers-reduced-motion) {
            translate: 0;
            opacity: 0;
            transition: opacity 500ms ease-in-out;
        }
    }

    .topnav__links {
        display: flex;
        align-items: center;
        gap: 1rem;
        /*align-items: center;*/
        margin: 0;
        padding: 0;

        @media (width < calc(700 / 16 * 1rem)) {
            flex-direction: column;
            align-items: stretch;
        }  
    }

    .topnav__item {
        list-style-type: none;

        /*&:last-child {
        @media (width < calc(700 / 16 * 1rem)) {
  		/*display: block;
        margin-top: 200px;
    */}

  	/*@media (width >= calc(700 / 16 * 1rem)) {
  	    margin-inline-start: 80px;
  	}

  	@media (width >= calc(1000 / 16 * 1rem)) {
  	    margin-left: auto;
  	}
    }*/

    .topnav_link {
	    font-family: var(--ff-mono);
	    font-weight: 700;
        color: var(--c-light-grey);
        transition: color 150ms ease-in-out;

	    @media (width >= calc(700 / 16 * 1rem)){
		    color: var(--c-dim-grey);
	    }

	    &:hover {
		    color: var(--c-dark-navy);
	    }
    }
}

@layer main {
    .main {
        display: flex;
    }
}

@layer hero {
    .hero {
        display: flex;
        flex-direction: row;
    }

    .hero-img {         
        display: flex;         
        justify-content: center;         
        align-items: center;
        flex: 2;
    } 

    .hero-registration-text {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 20px;
    }
    
    .hero-registration-text-content {
        display: flex;
        flex-direction: row;
        justify-content: center;
        text-align: center;
    }
    
    .hero-registration-text-content p{
        font-family: 'Montserrat', sans-serif;
        font-size: var(--fs-32);
        line-height: 1.6;
        margin: 0;
    }

    .hero-registration-text-btn {
        background-color: hsl(12, 86%, 57%);
        color: hsl(0, 0%, 0%);
        font-size: var(--fs-20);
        border: 2px solid hsl(5, 74%, 41%);
        border-radius: 12px;
        padding: 10px 15px;
        text-decoration: none;
        cursor: pointer;
    }

    .hero-registration-text-btn:hover {
        background-color: hsl(45, 97%, 86%);
        color: hsl(12, 86%, 57%);
    }
    
    /* Inscrire son Enfant Popup style */
    /* Modal Background */
    .modal {
        display: none; 
        position: fixed; 
        z-index: 1000; 
        left: 0;
        top: 0;
        width: 100%; 
        height: 100%; 
        background-color: rgba(0, 0, 0, 0.5); /* Dimmed background */
        align-items: center;
        justify-content: center;
    }

    /* Modal Content Box */
    .modal-content {
        background-color: #fff;
        padding: 30px;
        border-radius: 8px;
        width: 100%;
        max-width: 450px;
        position: relative;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        font-family: sans-serif;
    }

    Close Button */
    .close-btn {
        position: absolute;
        top: 15px;
        right: 20px;
        font-size: 28px;
        font-weight: bold;
        cursor: pointer;
        color: #aaa;
    }
    .close-btn:hover {
        color: #333;
    }

    /* Form Styling */
    .form-group {
        margin-bottom: 15px;
    }
    .form-group label {
        display: block;
        margin-bottom: 5px;
        font-weight: bold;
    }
    .form-group input {
        width: 100%;
        padding: 10px;
        border: 1px solid #ccc;
        border-radius: 4px;
        box-sizing: border-box;
    }
    .submit-btn {
        width: 100%;
        padding: 12px;
        background-color: #007BFF;
        color: white;
        border: none;
        border-radius: 4px;
        font-size: 16px;
        cursor: pointer;
    }
    .submit-btn:hover {
        background-color: #0056b3;
    }
    #formMessage {
        margin-top: 15px;
        text-align: center;
        font-weight: bold;
    }    
}

@layer card-container {
    .card-container {
        display: flex;
        padding: 65px;
        flex-direction: row;
        flex-wrap: wrap; 
        gap: 20px; 
        justify-content: space-between;
    }

    .card {
        flex: 1 1 calc(33.333% - 20px); 
        min-width: 250px;
        display: flex;
        flex-direction: column;
        gap: 12px;
        
    }

    /*.card-img{
        
    }*/

    .card-img-st{
        border-top-left-radius: 25px;
        border-top-right-radius: 25px;
    }

    .card-title{
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /*.card-text{

    }*/

    .card-text p {
        font-family: 'Lato', sans-serif;
        font-size: var(--fs-15);
        text-align: justify;
    }

    .card-btn{
        display: inline-block;
        background-color: hsl(60, 70%, 55%);
        color: hsl(0, 0%, 0%);
        font-size: var(--fs-20);
        border: 2px solid hsl(62, 68%, 43%);
        border-radius: 12px;
        padding: 10px 15px;
        text-decoration: none;
        cursor: pointer;
        text-align: center;
    }

    .card-btn:hover {
        background-color: hsl(45, 97%, 86%);
        color: hsl(12, 86%, 57%);
    }
}

@layer cycles{
    .cycles {
        display: flex;
        border: 1px solid hsl(185, 93%, 35%);
        border-radius: 25px;
        padding: 75px;
        width: 1000px;
        justify-content: center;
        margin: 0 auto;
    }
    
    .cycles-section {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 15px;
    }

    .cycles-section > div {
        flex: 1; 
        min-width: 200px;
    }

    .cycles-img{
        width: 200px;
        height: 200px;
        border-radius: 50%;
        border: 1px solid hsl(185, 93%, 35%);
    }

    .grade {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .cycle-title {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .cycle-title h2 {
        color: hsl(185, 94%, 13%);
        font-weight: 600;
    }
}

@layer school-stats {
    .school-stats {
        display: flex;
        justify-content: center; 
        align-items: center;
        width: 1000px;
        height: auto;
        padding: 75px;
        margin: 0 auto;
    }

    .graph-img img {
        max-width: 100%;
        height: auto;
    }

    .school-stats-title {
        display: flex;
        justify-content: center;
        align-items: center;
        text-decoration: underline;
        color: hsl(185, 94%, 13%);
    }
}

@layer kard-container {
    .kard-container {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 15px;
        gap: 100px;
        justify-content: center;
        margin: 0 auto;
        box-sizing: border-box;
        max-width: 1200px;
        border-radius: 12px;
        border: 1px solid hsl(185, 93%, 35%);
    }

    .kard-text {
        display: flex;
        justify-content: left;
    }

   .kard {
        flex: 1 1 400px;
        max-width: 40%;
        display: flex;
        flex-direction: row; 
        align-items: center;
        gap: 15px;
        padding: 5px;
        border-radius: 12px;
        border: 1px solid hsl(185, 93%, 35%);
        box-sizing: border-box;
    }

    .kard-text p{
        font-family: 'Poppins';
        font-size: var(--fs-15);
    }

    .kard img {
        max-width: 250px; /* Constrain image size so it fits inside the flex item */
        height: auto;
    }
    
    .kard-img-1 {
        border-radius: 50%;
        border: 1px solid hsl(185, 93%, 35%);
    }
    .kard-img-2 {
        width: 250px; /* Reduced to fit standard laptop rows */
        /*width: 300px;
        height: 300px;*/
        border-radius: 50%;
        border: 1px solid hsl(185, 93%, 35%);
        object-fit: cover;
    }
}

@layer students-results {
    .students-results {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 65px;
        gap: 30px;
    }

    .search-student {
        /* flex: 1 1 350px; */
        display: flex;
        flex-direction: column;
        flex: 1;
        gap: 15px;
        padding: 65px;
        border-radius: 25px;
        border: 1px solid hsl(185, 93%, 35%);
    }

    /*.search-bar{
        align-self: center;
        margin-bottom: 20px;
        display: flex;
        justify-content: space-between;
        transition: .2s;
    }

    .search-bar:hover{
        background-color: #fff8;
        box-shadow: 0 .1rem .4rem #0002;
    }*/

    .search-box-container{
        align-self: center;
        margin-bottom: 20px;
        display: flex;
        justify-content: space-between;
        transition: .2s;
        width: 100%;
        border: 4px solid hsl(185, 93%, 35%);
        border-radius: 15px;
    }

    .search-box-container:hover{
        background-color: #fff8;
        box-shadow: 0 .1rem .4rem #0002;
    }

    .search-bar-form {
        display: flex;
        flex-direction: row;
        width: 100%;
        padding: 5px;
        border-radius: 10px;
        background-color: gray;
        color: white ;
    }

    /*.search-bar img{
        width: 10px;
        height: 10px;
    }*/

    .search-icon {
        width: 1.2rem;
        height: 1.2rem;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /*.search-bar input{
        width: 100%;
        padding: 0 .5rem 0 .3rem;
        background-color: transparent;
        border: none;
        outline: none;
    }*/

    .search-input{
        width: 100%;
        padding: 0 .5rem 0 .3rem;
        background-color: transparent;
        border: none;
        outline: none;
        display: flex;
        color: white;
    }

    .students-testimony-card {
        /*flex: 1 1 450px;*/
        display: flex;
        flex-direction: column; 
        flex: 1;
        gap: 20px;
        padding: 40px;
        border-radius: 25px;
        border: 1px solid hsl(185, 93%, 35%);
    }

    .student-testimony-1, 
    .student-testimony-2 {
        display: flex;
        flex-direction: row; 
        align-items: center;
        padding: 5px;
        gap: 15px;
        border-radius: 5px;
        border: 1px solid hsl(185, 93%, 35%);
    }
    
    .student-testimony-1-img, 
    .student-testimony-2-img {
        display: flex;
        flex: 1;
        width: 100%;
        height: 100%;
        border-radius: 5px;
        border: 1px solid hsl(185, 93%, 35%);
    }

    .student-testimony-kl-img{
        width: 100%;
        height: 100%;
        border-radius: 5px;
    }
    
    .student-testimony-1-text {
        display: flex;
        flex: 1;
        padding: 10px;
        border-radius: 5px;
        border: 1px solid hsl(185, 93%, 35%);
    }

    .student-testimony-1-text p{
        text-align: justify;
    }

    .result-list{
        padding: 25px;
        border-radius: 5px;
        font-size: var(--fs-24);
        border: 1px solid hsl(185, 93%, 35%);
    }

    .result-list p{
        text-align: justify;
    }
}

@layer footer {
    /* Base Footer Styles */
    .curved-footer {
        background-image: linear-gradient(to right, hsl(185, 93%, 35%), hsl(0, 0%, 0%)); 
        /*background-color: #1a1a1a;*/ /* Dark background example */
        color: #ffffff;
        padding: 60px 20px 30px 20px;
        position: relative;
    
        /* 1. Curved Top Effect */
        border-top-left-radius: 50% 40px;
        border-top-right-radius: 50% 40px;
    }

    /* Main Container Layout */
    .footer-content {
        display: flex;
        flex-direction: column;
        max-width: 1200px;
        margin: 0 auto;
        gap: 40px;
    }

    /* Top Section (Contact) */
    .footer-ceontent-top {
        display: flex;
        flex-direction: column;
        gap: 8px;
        border-bottom: 1px solid hsl(0, 0%, 100%);
        padding-bottom: 20px;
    }

    .footer-ceontent-top h3 {
        margin: 0 0 4px 0;
    }

    .footer-ceontent-top h5 {
        margin: 0;
        font-weight: normal;
    }

    /* Middle Section (Columns Layout) */
    .footer-content-middle {
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap; /* Keeps it responsive on smaller screens */
        gap: 30px;
    }

    /* Sub-containers alignment */
    .footer-content-middle-left,
    .footer-content-middle-middle,
    .footer-content-middle-right {
        display: flex;
        flex-direction: column;
        gap: 15px;
        flex: 1; /* Distributes width evenly */
        min-width: 200px; /* Prevents columns from becoming too narrow */
    }

    /* Link Lists */
    .footer-links {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .footer-links a {
        color: #cccccc;
        text-decoration: none;
        transition: color 0.2s ease;
    }

    .footer-links a:hover {
        color: #ffffff;
    }

    /* Social Media Icons */
    .social-links {
        display: flex;
        gap: 15px;
    }

    .social-links a {
        color: #ffffff;
        font-size: 1.2rem;
        transition: transform 0.2s ease;
    }

    .social-links a:hover {
        transform: translateY(-3px);
    }

    /* Bottom Section (Copyright/Legal) */
    .footer-content-bottom {
        border-top: 1px solid hsl(0, 0%, 100%);
        padding-top: 20px;
        font-size: 0.9rem;
        color: #888888;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .footer-content-bottom-left {
        display: flex;
        gap: 20px;
    }

    .footer-content-bottom-right {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 5px;
    }

    .footer-content-bottom-left h6{
        color: #cccccc;
    }

    .ABA-link {
        color: #cccccc;
    }
}