@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

body{
    background-color: #FFFFFF;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.main-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    background-color: #FFFFFF;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    box-sizing: border-box;
}

.logo {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    padding: 20px;
}

.logo .logo-img img{
    width: 125px;
    height: 125px;
}

.logo .logo-company-moto h1{
    font-size: 2.2em;
}

.logo .logo-company-moto h2{
    font-size: 12px;
    font-weight: 400;
    text-decoration: none;
}

/* section card style goes here */
.section-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  padding: 20px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

.card-bursary, 
.card-video, 
.card-website {
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.section-card img,
.section-card video {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-title {
  padding: 16px;
}

.card-title h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #333333;
}

/* 1. Target all card classes to create a positioning context */
.card-bursary, 
.card-video, 
.card-website {
  position: relative; /* Crucial: anchors the icon inside the card */
  overflow: hidden;   /* Prevents elements from spilling out */
}

/* 2. Position the forward icon in the top-right corner */
.card-icon {
  position: absolute;
  top: 15px;          /* Adjust distance from the top */
  right: 15px;        /* Adjust distance from the right */
  z-index: 10;        /* Ensures icon sits on top of images/videos */
  font-size: 1.2rem;  /* Icon size */
  color: #000000;     /* Icon color (change as needed) */
  cursor: pointer;
}

section-card > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Aligns items to the left */
}

.section-card img {
  order: -1; /* Forces the image to appear first */
  margin-bottom: 10px;
  width: 24px; /* Adjust size as needed */
  height: 24px;
}*/


/* search wrapper style goes here */
.search-wrapper{
    position: relative;
}

.search-results-popu {
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background-color: #FEFEFE;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
    z-index: 999;
    margin-bottom: 5px;
}

.search-result-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.search-result-item:hover{
    background-color: #F5F5F5;
}

.search-box-container {
    position: relative;
  background-color: #ffffff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 450px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto;
  margin-bottom: 20px;
  box-sizing: border-box;
}

.search-bar-form {
  width: 100%;
  display: flex;
  align-items: center;
  background-color: #f3f4f6;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 6px 12px;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.search-icon {
  width: 20px;
  height: 20px;
  color: #9ca3af;
  margin-right: 10px;
  flex-shrink: 0;
}

.search-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-size: 16px;
  color: #1f2937;
  padding: 6px 0;
}

.search-input::placeholder {
  color: #9ca3af;
}

.search-bar-form:focus-within {
  background-color: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.search-bar-form:focus-within .search-icon {
  color:/* #3b82f6*/#006BE7;
}



/* Tablets (768px and down) */
@media (max-width: 768px) {
    .main-container {
        width: 95%; 
    }
    
    .search-box-container {
        padding: 20px; 
        max-width: 90%; 
    }
}

/* Phones (480px and down) */
@media (max-width: 480px) {
    .main-container {
        width: 100%; 
        padding: 10px;
    }
    
    .search-box-container {
        flex-direction: column; 
        gap: 15px; 
        padding: 15px;
        max-width: 100%;
    }

    .search-bar-form {
        flex-direction: row; 
        padding: 8px; 
    }
}

/* RESPONSIVE STYLES for section card*/

/* Tablets (Portrait and Landscape) */
@media screen and (max-width: 768px) {
  .section-card {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    padding: 16px;
  }
  
  .section-card img, 
  .section-card video {   
    height: 180px; 
  }
  
  .card-title h2 {   
    font-size: 1.3rem; 
  }
}

/* Mobile Phones */
@media screen and (max-width: 480px) {
  .section-card {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
  }
  
  .section-card img, 
  .section-card video {   
    height: 160px; 
  }
  
  .card-title {   
    padding: 12px; 
  }
  
  .card-title h2 {   
    font-size: 1.15rem; 
  }
}

/* Tablet Layout (Screens under 1024px) */
@media (max-width: 1024px) {
  .section-card > div {
    flex-direction: column;
    align-items: flex-start; /* Stack vertically, align left */
  }

  .section-card img {
    order: -1; /* Fixed syntax: moves image to the top */
    margin-bottom: 10px;
    margin-right: 0;
  }
}

/* Mobile Layout (Screens under 480px) */
@media (max-width: 480px) {
  .section-card > div {
    align-items: center; /* Center items for narrow phone screens */
    text-align: center;
  }

  .section-card img {
    width: 32px; /* Slightly larger image for touch targets if needed */
    height: 32px;
    margin-bottom: 15px;
  }
}
