/* ====================================================
   GLOBAL STYLES
   ==================================================== */
body {
  margin: 0;
  font-family: "Poppins", Arial, sans-serif;
  color: #222;
  background-color: #f9fafb;
  overflow-x: hidden;
}

/* ====================================================
   HERO SECTION
   ==================================================== */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  display: none;
  z-index: 0;
  animation: fadeEffect 1.5s ease-in-out;
}

.hero-overlay .logo {
  width: 180px;      /* increase width */
  height: auto;      /* keep perfect ratio */
  margin: 20px auto; /* center the image */
  display: block;
  z-index: 1;
}


.logo {
  position: absolute;
  top: 25px;
  left: 25px;
  width: 120px;
  z-index: 3;
}

.hero-text {
  position: absolute;
  top: 50%;
  left: 42%;
  transform: translate(-50%, -50%);
  color: white;
  text-align: center;
  z-index: 3;
  padding-left: 100px !important;
}

.hero-text h1 {
  font-size: 2.8rem;
  margin-bottom: 10px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
 text-align: center;
 margin: 0 auto;
  /* padding-left: 200px; */  
} 

.hero-text p {
  font-size: 1.2rem;
  line-height: 1.6;
  max-width: 600px; 
  margin: 0 auto;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
  /* padding-left: 200px; */
 text-align: center;
}

/* ====================================================
   CATEGORY SECTION
   ==================================================== */
.categories {
  padding: 60px 20px;
  background: #fff;
  text-align: center;
}

.categories h2 {
  color: #004b87;
  font-size: 2rem;
  margin-bottom: 30px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;                 /* 🔑 smaller gap */
  max-width: 1000px;
  margin: 0 auto;
}

.category-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;

  display: flex;
  flex-direction: column;
  align-items: center;

  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.category-card h3 {
  margin: 10px 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #004b87;
  text-align: center;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* ====================================================
   LATEST RESOURCES SECTION
   ==================================================== */
.technologies {
  padding: 60px 20px;
  text-align: center;
  background: #f9fafb;
}

.technologies h2 {
  color: #004b87;
  font-size: 2rem;
  margin-bottom: 40px;
  font-weight: 600;
}

/* ============================
   CLEAN & FIXED TECH CARDS
   ============================ */

/* GRID: 3 cards per row */
.tech-grid {
  display: grid;
   grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

/* CARD */
.tech-card {
  display: flex;
  flex-direction: row;
  width: 100%;
  min-height: 200px;  /* instead of fixed 180px */
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  overflow: hidden;
  cursor: pointer;
  transition: 0.3s ease;
}


.tech-card:hover {
  transform: translateY(-5px);
}

/* LEFT IMAGE BLOCK */
.tech-left {
  width: 180px;
  height: 100%;
  flex-shrink: 0;
}

.tech-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* RIGHT CONTENT */
.tech-right {
  padding: 15px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* important */
  flex: 1;
  text-align: left;
}

/* TITLE */
.tech-title {
    margin: 0 0 8px 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #004b87;
  display: -webkit-box;
  -webkit-line-clamp: 2; 
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  max-height: 45px; /* prevents pushing button */

}

/* DETAILS */
.tech-details p {
  margin: 4px 0;
  font-size: 0.9rem;
  color: #444;  
}

.tech-details {
  /* flex-grow: 1;
  max-height: 60px;
  overflow: hidden; */
   margin-bottom: 10px;
}


/* BUTTON */
.know-more-btn {
  /* margin-top: auto; */
  margin-top: auto;
  align-self: flex-start;
  background: #004b87;
  color: #fff;
  border: none;
  padding: 7px 14px;
  font-size: 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s ease;
}

.know-more-btn:hover {
  background: #004b87;
}



.index-page .category-card {
  background: linear-gradient(135deg, #004b87, #004b87) !important;
  color: white !important;
}

.index-page .category-card h3 {
  color: white !important;
}

.index-page .category-card:hover {
  background: linear-gradient(135deg, #004b87, #004b87) !important;
}
/* ============================
   RESPONSIVE FIXES
   ============================ */

@media (max-width: 800px) {
  .tech-card {
    height: auto;
    flex-direction: column;
  }

  .tech-left {
    width: 100%;
    height: 200px;
  }

  .tech-img {
    width: 100%;
  }
   .tech-content {
    width: 100%;
    padding: 20px;
  }
}



@media (max-width: 768px) {
  .logo {
    width: 90px;
    top: 15px;
    left: 15px;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text p {
    font-size: 1rem;
  }


}

@media (max-width: 600px) {
  .tech-content h3 {
    font-size: 1.1rem;
  }

  .tech-info p {
    font-size: 0.9rem;
  }

  .know-more-btn {
    font-size: 0.85rem;
    padding: 7px 12px;
  }

  .category-card {
    min-height: 70px;
    padding: 14px 10px;
    font-size: 0.9rem;
  }
  
}

@media (max-width: 600px) {
  .tech-grid {
    grid-template-columns: 1fr;
  }

  .tech-card {
    height: auto;
    flex-direction: column;
  }

  .tech-img {
    width: 100%;
    height: 200px;
  }
}

/* ====================================================
   FADE ANIMATION
   ==================================================== */
@keyframes fadeEffect {
  from { opacity: 0.3; }
  to { opacity: 1; }
}


/* ===============================
   HERO STACK FIX FOR MOBILE MENU
================================ */

.hero,
.hero-slide,
.hero-overlay,
.hero-text,
.logo {
  z-index: 1 !important;
}


