@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

.academics-container {
    width: 100%;
    margin-top: 400px;
    background: #ddd;
    position: relative;
    z-index: 2;
    font-family: "Inter", sans-serif;
    /*box-shadow: 0 -5px 10px #333;*/
}

.academics-header {
    height: 60px;
    background: rgba(0,0,0,0);
    position: absolute;
    left: 60px;
    top: -120px;
    display: flex;
    align-items: center;
    padding-left: 20px;
    font-family: "Inter", sans-serif;
    font-size: 40px;
    color:#fff;
    font-weight:600;
    letter-spacing:2px;
}

.academics-header::before {
    content: "";
    width: 200px;
    height: 8px;
    /* background: #003B7D; */
    position: absolute;
    top: 0;
    left: 0;

}

.new-academic-container{
    width:100%; 
    background:rgba(0,0,0,0);
    display:flex;
    justify-content:center;
}


.masonry-grid {
  width:95%;
  margin-top:20px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr; 
  grid-auto-rows: 250px; 
  grid-auto-flow: row dense;
  gap: 20px;
  margin-bottom:20px;
}

.masonry-item {
  position: relative;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: flex-end; /* Places button at the bottom */
  justify-content: center;
  padding-bottom: 20px;
  min-height: 200px;
}

/* Darken the bottom slightly so the button is readable */
.item-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent 60%, rgba(0,0,0,0.5));
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 20px;
  width: 100%;
}

/* Button styling based on your screenshot */
.grid-btn {
  background: rgba(0, 32, 91, 0.8); /* Dark blue with transparency */
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
}

.grid-btn:hover {
  background: rgba(0, 32, 91, 1);
  transform: scale(1.05);
}

/* This makes specific items span 2 columns */
.item-wide {
  grid-column: span 2;
}

/* This makes specific items span 2 rows (taller) */
.item-tall {
  grid-row: span 2;
}

@media (max-width: 1024px) {
  .masonry-grid {
    grid-template-columns: 1fr 1fr;
  }
  /* In a 2-column grid, a span-2 item takes the whole row */
  .item-wide {
    grid-column: span 2;
  }
}

/* 3. Mobile Styles (Switch to 1 Column) */
@media (max-width: 600px) {
  .masonry-grid {
    grid-template-columns: 1fr; /* Everything is full width */
    grid-auto-rows: auto; /* Let items height be natural on mobile */
  }
  /* On mobile, we reset spans so things don't break the screen width */
  .item-wide, .item-tall {
    grid-column: span 1;
    grid-row: span 1;
  }
}

/* Mobile Styles (Below 450px) */
@media (max-width: 450px) {
  .masonry-grid {
    /* 1. Force a single column */
    grid-template-columns: 1fr !important; 
    
    /* 2. Change fixed height to 'auto' so they don't look like thin slivers */
    grid-auto-rows: auto !important; 
    
    gap: 15px;
  }

  .masonry-item {
    /* 3. Give them a minimum height so they don't collapse if empty */
    min-height: 200px; 
    width: 100%;
    padding: 20px; /* Optional: adds space for your text numbers */
  }

  /* 4. Reset spans so items don't try to occupy multiple (non-existent) columns */
  .item-wide, .item-tall {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }
}

.new-academic-item-container{
    flex:0 0 33%; 
    height: 350px; 
    position:relative;
    background-size:cover;
    background-position: center;
    width:100%;
    
}

.new-academic-item-container::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0,0,0,0),rgba(0,0,0,0), rgba(0,0,0,0.7)); /* 50% black */
    z-index: 1;
}

.new-academic-button{
    background:rgba(0,0,0,0.4); 
        padding:10px 20px; 
        position:absolute; 
        bottom:10px; 
        border:3px solid #012368; 
        border-radius: 10px; 
        left:50%; 
        transform:translateX(-50%); 
        color: #fff;
        font-family: 'Inter', sans-serif;
        font-size:14px;
        font-weight:600;
        transition: background 0.3s ease-in-out,  color 0.3s ease-in-out;
        z-index:2;
        white-space:nowrap;
        cursor:pointer;
}

.new-academic-button:hover{
    background:#fff;
    color:#333;
}

.new-academic-section{
    width:100%; 
    padding:100px 0;  
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display:flex; 
    justify-content:center;
    position:relative;
}

.new-academic-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0,0,0,0.5),rgba(0,0,0,0.5)); /* 50% black */
    z-index: 1;
}

.nas-container{
    color:#fff; 
    width:30%; 
    text-align:center; 
    z-index:2;
}

.nash1{
    font-size:38px;
    font-family: 'Inter', sans-serif;
    font-weight:600;
}

.nash2{
    font-size:30px;
    font-family: 'Inter', sans-serif;
    font-weight:600; 
    margin-top:20px
}

.nas-item{
    background:#ffffff00; 
    border:2px solid #fff; 
    border-radius:10px; 
    padding:20px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size:14px;
    font-weight:600;
    margin-top:15px;
    transition: background 0.3s ease-in-out,  color 0.3s ease-in-out;
    cursor:pointer;
}

.nas-item:hover{
    border:2px solid #012368; 
    background: #012368;
    color:#ffffff;
}




.academics-banner {
    width: 100%;
    height: 400px;
    background: #333;
    position: fixed;
    top: 0;
    z-index: 1;
}

.academics-div {
    width: 100%;
    height: 350px;
    position: relative;
    overflow: hidden;
}

.academics-div-container {
    width: 100%;
    position: relative;
    height: 250px;
    background: linear-gradient(180deg, rgba(0, 59, 125, 1) 0%, rgba(22, 100, 192, 1) 100%);
}

.academics-div-header {
    top: 10px;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    z-index: 2;
}

.academics-div-header.left {
    position: relative;
    left: 30px;
}

.academics-div-header.right {
    position: absolute;
    right: 30px;
}

.academics-div-content {
    top: 20px;
    color: #fff;
    font-size: 12px;
    width: 300px;
    z-index: 2;
}

.academics-div-content.left {
    position: relative;
    left: 30px;
}

.academics-div-content.right {
    position: absolute;
    top: 50px;
    right: 30px;
}

.academics-content-container {
    position: absolute;
    width: 600px;
    height: 250px;
    bottom: -70px;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    z-index: 99;
}

.academics-content-container.left {
    left: 350px;
}

.academics-content-container.right {
    right: 350px;
}

.academics-program-container {
    width: 180px;
    height: 240px;
    background: #ddd;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.academics-program-container::after {
    content: "";
    position: absolute;
    width: inherit;
    height: inherit;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.5) 100%);
    z-index: 20;
}

.academics-program-container img {
    height: 100%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.academics-program-container .title {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 30;
    color: #fff;
    font-weight: 500;
    font-size: 14px;
}

.academics-hero-image {
    background: #333;
    width: 500px;
    height: 320px;
    position: absolute;
    top: 0;
    object-fit: cover;
}



.academics-hero-image.left {
    right: 0;
    clip-path: polygon(150px 0%, 100% 0%, 100% 100%, 0% 100%);

}

.academics-hero-image.right {
    left: 0;
    clip-path: polygon(0 0, 100% 0%, 350px 100%, 0% 100%);

}


.academics-arrow-container {
    position: absolute;
    bottom: 40px;
    font-size: 14px;
    color: #fff;
    width: 180px;
    display: flex;
    justify-content: space-around;
}

.academics-arrow-container.left {
    left: 30px;
}

.academics-arrow-container.right {
    right: 30px;
}

.academics-arrow-left {
    background: linear-gradient(270deg, rgba(0, 59, 125, 1) 0%, rgba(22, 100, 192, 1) 100%);
    padding: 0 30px;
    border-radius: 20px;
}

.academics-arrow-right {
    background: linear-gradient(90deg, rgba(0, 59, 125, 1) 0%, rgba(22, 100, 192, 1) 100%);
    padding: 0 30px;
    border-radius: 20px;
}

.academic-read-more {
    background: linear-gradient(90deg, rgba(0, 59, 125, 1) 0%, rgba(22, 100, 192, 1) 100%);
    padding: 5px 30px;
    border-radius: 20px;
    cursor: pointer;
}

.item-overlay a{
    color:#fff;
    text-decoration:none;
}

@media screen and (max-width: 960px) {
    .academics-content-container {
        width: 470px;
    }

    .academics-program-container {
        width: 150px;
        height: 200px;
        border-radius: 15px;
    }

    .academics-hero-image {
        width: 450px;
    }
}

@media screen and (max-width: 820px) {
    /*.academics-header {
        width: 280px;
        height: 45px;
        background: #fff;
        position: absolute;
        left: 60px;
        top: -120px;
        display: flex;
        align-items: center;
        padding-left: 20px;
        font-size: 14px;
    }

    .academics-header::before {
        content: "";
        width: 150px;
        height: 6px;
        background: #003B7D;
        position: absolute;
        top: 0;
        left: 0;
    }*/

    .academics-banner {
        width: 100%;
        height: 380px;
    }

    .academics-container {
        width: 100%;
        margin-top: 380px;
    }

    .academics-content-container {
        width: 470px;
    }

    .academics-program-container {
        width: 150px;
        height: 200px;
        border-radius: 15px;
    }

    .academics-hero-image {
        width: 480px;
        height: 275px;
    }

    .academics-div {
        height: 500px;
    }

    .academics-content-container.left {
        left: 50%;
        top: 230px;
        transform: translateX(-50%);
    }

    .academics-arrow-container.left {
        left: 50%;
        transform: translateX(-50%);
        bottom: 15px;
    }

    .academics-content-container.right {
        left: 50%;
        top: 230px;
        transform: translateX(-50%);
    }

    .academics-arrow-container.right {
        left: 50%;
        transform: translateX(-50%);
        bottom: 15px;
    }
    
    .new-academic-item-container{
        flex:0 0 calc(50% - 5px);
    }
    
    .nas-container{
        width:50%;
    }
}
@media screen and (max-width:540px){
    .new-academic-item-container{
        flex:0 0 calc(100% - 5px);
    }
    .nas-container{
        width:80%;
    }
}
@media screen and (max-width: 480px) {
    /*.academics-header {
        width: 220px;
        height: 40px;
        background: #fff;
        position: absolute;
        left: 30px;
        top: -60px;
        display: flex;
        align-items: center;
        padding-left: 20px;
        font-size: 14px;
        font-weight: 600;
    }

    .academics-header::before {
        content: "";
        width: 150px;
        height: 6px;
        background: #003B7D;
        position: absolute;
        top: 0;
        left: 0;
    }
*/
    .academics-banner {
        width: 100%;
        height: 300px;
    }

    .academics-container {
        width: 100%;
        margin-top: 300px;
    }

    .academics-content-container {
        width: 370px;
    }

    .academics-program-container {
        width: 115px;
        height: 160px;
        border-radius: 15px;
    }

    .academics-hero-image.right {
        left: 0;
        clip-path: polygon(0 0, 100% 0%, 240px 100%, 0% 100%);

    }


    .academics-hero-image {
        width: 350px;
        height: 275px;
    }

    .academics-div {
        height: 500px;
    }

    .academics-content-container.left {
        left: 50%;
        top: 240px;
        transform: translateX(-50%);
        height:0;
    }

    .academics-arrow-container.left {
        left: 50%;
        transform: translateX(-50%);
        bottom: 30px;
    }

    .academics-content-container.right {
        left: 50%;
        top: 240px;
        transform: translateX(-50%);
        height:0;
    }

    .academics-arrow-container.right {
        left: 50%;
        transform: translateX(-50%);
        bottom: 30px;
    }
}