* {
    /* Applicable for all html elements */
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
}

.header{
    min-height: 100vh;  
    width: 100%; /* or use 100vw */
    background-image: linear-gradient(rgba(17, 31, 85, 0.7), rgba(5, 13, 42, 0.7)), url(./images/home/nticbg.jpg);
    background-position: center;
    background-size: cover;
    position: relative;
}

nav{
    display: flex;
    flex-direction: column;
    padding: 0.5% 6%;  /* 2% for top-bottom and 6% for left and right */
    justify-content: space-between;
    align-items: center;
}

nav img {
    width: 150px;
}

.nav_links{
    flex: 1;  /* occupies all the space in the row */
    text-align: right;
}

.nav_links ul li{
    list-style: none;  /* removing the bullets */
    display: inline-block; /* to display every item horizontally */
    padding: 8px 12px;
    position: relative;
}

.nav_links ul li a{
    color: whitesmoke;
    text-decoration: none;
    font-size: 14px;
}

.nav_links ul li::after{
    content: '';
    width: 0%;
    height: 2px;
    background: #f44336;  /* color of the hover effect on navbar items */
    display: block;
    margin: auto;
    transition: 0.5s;
}

.nav_links ul li:hover::after{
    width: 100%;
}

.text-box{
    width: 90%;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);  /* this will take it to the center of the div */
    text-align: center;
}

.text-box h1{
    font-size: 62px;
}

.text-box p{
    margin: 10px 0 40px;
    font-size: 15px;
    color: white;
}

.know-more-btn{
    display: inline-block;
    text-decoration: none;
    color: white;
    border: 1px solid white;
    padding: 12px 34px;
    font-size: 14px;
    background: transparent;
    cursor: pointer;
}

.know-more-btn:hover{
    /* border: 1px solid #f33446; */
    /* transition-delay: 0.5ms; */
    background: #b63541;  /* Color of Visit us to know more hover effect */
    transition: 0.5s;
}

nav .fa{
    display: none;  /* Hides the icons for small screen display */
}






/* the code inside media query here will be applicable for all the devices with width less than
or equal to 700px */
@media(max-width: 700px){

    nav{
        flex-direction:row;
    }

    .text-box h1{
        font-size: 20px;
    }

    .nav_links ul li{
        display: block;
    }

    .nav_links{
        position: fixed;
        background: #f44336;  /* color of nav-bar in small screens */
        height: 100vh;
        width: 200px;
        top: 0;
        right: -200px;
        text-align: left;
        z-index: 2;
        transition: 0.8s;
    }

    nav .fa{
        display: block;
        color: #fff;
        margin: 10px;
        font-size: 22px;
        cursor: pointer;
    }

    .nav_links ul{
        padding: 30px;
    }
}


/* CSS FOR COURSE SECTION */

.course{
    width: 80%;
    margin: auto;
    text-align: center;
    padding-top: 100px;
}

h1{
    font-size: 36px;
    font-weight: 600;
}

p{
    color: #777;
    font-size: 14px;
    font-weight: 22px;
    line-height: 22px;
    padding: 10px;

}

.row{
    margin-top: 5%;
    display: flex;
    justify-content: space-between;
    gap:2em;
}

section > p{
    max-width:60ch;
    text-align: center;
    margin-inline:auto;
}

section > h1{
    margin-bottom:1em;
}

.course-col{
    flex-basis: 30%;
    background: #fffcf7;
    border-radius: 10px;
    margin-bottom: 5%;
    padding: 20px 12px;
    box-sizing: border-box;
    transition: 0.5s;
}

h3{
    text-align: center;
    font-weight: 600;
    margin: 10px 0;
}

.course-col:hover{
    box-shadow: 0 0 20px 0px rgba(0, 0, 0, 0.2);
    /* transition: 0.5s; */
}

@media(max-width: 700px){
    .row{
        flex-direction: column;
    }
}



/* CSS FOR CAMPUS SECTION */

.campus{
    width: 80%;
    margin: auto;
    text-align: center;
    padding-top: 50px;
}

.campus-col{
    flex-basis: 32%;
    border-radius: 10px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.campus-col img{
    width: 100%;
    display: block;

}

.layer{
    background: transparent;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.layer:hover{
    background: rgba(226,0,0,0.7);
    transition: 0.5s;
}

.layer h3{
    width: 100%;
    font-weight: 500;
    color: white;
    font-size: 26px;
    bottom: 0;
    left: 50%;
    transform: translate(-50%);  /* x= -50%, at the bottom and center of the x-axis */
    position: absolute;
    opacity: 0;
    transition: 0.5s;
}

.layer:hover h3{
    bottom: 49%;  /* leaves 49% space at the bottom when hover */
    opacity: 1;
}


/* CSS FOR EVENTS (FACILITIES) */

.wrapper{
    width:90%;
    max-width:1200px;
    margin-inline:auto;
}

.facilities{
    text-align: center;
    margin:2em auto;
}

.facilities-wrapper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1em; /* Reduced gap */
}


.facilities-col {
    background: #fff;
    border-radius: 16px;
    box-shadow: 2px 2px 20px rgba(0, 0, 0, .1);
    display: flex;
    flex-direction: column;
    flex-basis: 100%;
    align-items: center;
    justify-content: flex-start;
    height: 400px;              /* If you want to keep this */
    min-width: 0;
    padding: 1em;
    transition: box-shadow 0.2s;
    overflow: auto;             /* Add this if you keep fixed height */
    gap: 0.8em;                 /* Add spacing between children */
  }

.facilities-col:hover {
  box-shadow: 0 4px 24px 0 rgba(0,0,0,0.15);
}

.facilities-img-container {
  width: 100%;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  background: #f5f7fa;
}

.facilities-col img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 10px;
}

.facilities-col h3 {
    margin: 0 0 0.5em 0;
    font-size: 1.1em;
    text-align: center;
}

.facilities-col p {
    text-align: center;
    font-size: 1em;
    margin: 0;
}

@media (max-width: 900px) {
  .facilities-wrapper {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8em;
  }
  .facilities-col {
    height: 340px;
  }
  .facilities-img-container {
    height: 160px;
  }
}

@media (max-width: 600px) {
  .facilities-wrapper {
    grid-template-columns: 1fr;
    gap: 0.7em;
  }
  .facilities-col {
    height: 320px;
  }
  .facilities-img-container {
    height: 120px;
  }
}


/* CSS FOR TESTIMONIALS */

.testimonials{
    width: 80%;
    margin-inline: auto;
    /* padding-top: 100px; */
    text-align: center;
    margin-top: 2.5em;
}

.testimonial-col{
    flex-basis: 100%;
    border-radius: 10px;
    margin-bottom: 5%;
    text-align: left;
    background: #fffcf7;
    padding: 25px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items:center;
    gap:1em;
    text-align: center;
}

.testimonial-col img{
    height: 100px;
    margin-left: 5px;
    margin-right: 30px;
    border-radius: 50%;

}

/* .testimonial-col p{
    max-width:25ch;
} */

.testimonial-col h3{
    margin-top: 15px;
}

.testimonial-col .fa{
    color: #f44336;
}
@media(max-width: 700px){
    .testimonial-col img{
        margin-left: 0;
        margin-right: 15px;
    }
}



/* CSS FOR CALL TO ACTION */

.cta{
    margin: 100px auto;
    width: 80%;
    background-image: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)), url(images/home/contactcta.png);
    background-position: center;
    background-size: cover;
    border-radius: 10px;
    text-align: center;
    padding: 100px 0;
}

.cta h1{
    color: #fff;
    margin-bottom: 40px;
    padding: 0;
}

@media(max-width: 700px){
    .cta h1{
        font-size: 24px;
    }
}



/* CSS FOR FOOTER */

.footer{
    width: 100%;
    text-align: center;
    padding: 30px 0;
}

.footer h4{
    margin-bottom: 25px;
    margin-top: 20px;
    font-weight: 600;
}

.footer-icons a{
    text-decoration: none;
    color: black;
    margin: 0 13px;
    padding: 18px 0;
    
}






/* CSS FOR ABOUT US PAGE */

.sub-header{
    height: 50vh;
    width: 100%;
    background-image: linear-gradient(rgba(60, 90, 180, 0.60), rgba(10, 20, 60, 0.70)), url(images/allpagetopbg.jpg);
    background-position: center;
    background-size: cover;
    text-align: center;
    color: white;
}

.sub-header h1{
    margin-top: 70px;
}

.about-us{
    width: 80%;
    margin: auto;
    padding-top: 80px;
    padding-bottom: 50px;
}

.about-col{
    flex-basis: 48%;
    padding: 30px 2px;
    /* text-align: justify; */
}

.about-col img{
    width: 100%;
}

.about-col h1{
    padding-top: 0;
}

.about-col p{
    margin-top: 20px;
    padding-top: 15px 0 25px;
    margin-bottom: 20px;
}

.red-btn{
    border: 1px solid #c23329;
    background: transparent;
    color: #c23329;
}

.red-btn:hover{
    color: white;
}



/* CSS FOR BLOG CONTENT (BOARD MEMBERS) */

.blog-content{
    width: 80%;
    margin: auto;
    padding: 60px 0;
}

.blog-left{
    flex-basis: 100%;
}

.eventpics{
    flex-basis: 100%;
}

.blog-left img{
    width: 100%;
}

.blog-content .row{
    gap:2em;
}

.blog-left h2{
    color: #222;
    font-weight: 600;
    /* margin: 30px 0; */
    margin:.3em 0;
}

.blog-left p{
    /* text-align: justify; */
    color: #999;
    padding: 0;
}

.blog-right{
    flex-basis: 32%;
}

.blog-right h3{
    background: #f44336;
    color: white;
    padding: 7px 0;
    font-size: 16px;
    margin-bottom: -20px;
}

.blog-right div{
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #555;
    padding: 8px;
    box-sizing: border-box;

}


.comment-box{
    border: 1px solid #ccc;
    margin: 50px 0;
    padding: 10px 20px;
}

.comment-box h3{
    text-align: left;
}

.comment-form input, .comment-form textarea{
    width: 100%;
    padding: 10px;
    margin: 15px 0;
    box-sizing: border-box;
    border: black;
    outline: none;
    background: #f0f0f0;
}

.comment-form button{
    margin: 10px 0;
}
/* 
.board-members{
    display:grid;
    grid-template-columns:repeat(3,1fr)
} */

.blog-left{
    width:100%;
}

.blog-left .container .board-members{
    display:grid;
    grid-template-columns:repeat(1,1fr);
    gap:1.5em;
}



.card:hover {
    transform: scale(1.05);
  }


.blog-left .card{
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    height:100%;
    background-color: #fff;
    transition: transform 0.3s ease;
}

.blog-left .member .card img{
    aspect-ratio: 1/1;
    object-fit: cover;
}

.blog-left .member-info{
    text-align: center;
    padding:.5em;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
  }
  
  .modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width:80%;
    max-width:350px;
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    display:flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  #modal-image {
      max-width:250px;
      width:100%;
  }
  #member-info {
    text-align: center;
  } 
  
  
  .close {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 24px;
  }
  

@media(max-width: 700px){
    .sub-header h1{
        font-size: 24px;
    }
}



/* CSS FOR CONTACT US */

.location{
    width: 80%;
    margin: auto;
    padding: 20px 0;
}

.location iframe{
    width: 100%;
}


.contact-us{
    width: 80%;
    margin: auto;
}

.contact-col{
    flex-basis: 48%;
    margin-bottom: 30px;
}

.contact-col div{
    display: flex;
    align-items: center;
    margin-bottom: 40px;
}

.contact-col div .fa{
    font-size: 28px;
    color: #f44336;
    margin: 10px;
    margin-right: 30px;
}

.contact-col div p{
    padding: 0;
}

.contact-col div h5{
    font-size: 16px;
    margin-bottom: 5px;
    color: #555;
    font-weight: bold;
}

.contact-col input, textarea{
    width: 100%;
    padding: 15px;
    margin-bottom: 17px;
    outline: none;
    border: 1px solid #ccc;
    box-sizing: border-box;
}


@media screen and (min-width : 500px){
    .facilities-wrapper{
        grid-template-columns:repeat(2,1fr);
    }
}

@media screen and (min-width:600px) {
    .blog-left .container .board-members{
        grid-template-columns:repeat(2,1fr);
    }

}

@media screen and (min-width:800px) {
   
    .facilities-wrapper{
        grid-template-columns:repeat(4,1fr);
    }
}

@media screen and (min-width:1000px) {
   
    .blog-left .container .board-members{
        grid-template-columns:repeat(3,1fr);
    }
}

.member-stat-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 1em 0;
    font-size: 1rem;
    color: #555;
    font-weight: 400;
}

#members-stats {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}
