/* 🌍 Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', sans-serif;
}



/* 🌈 Theme Variables */
:root {
  --bg-gradient: linear-gradient(135deg, #f0f4f8, #dfe9f3);
  --text-color: #111;
  --card-bg: rgba(255, 255, 255, 0.8);
  --accent-color: #195BE9;
  --accent-gradient: linear-gradient(90deg, #195BE9, #00e0ff);
  --footer-color: #555;
}

/* 🌙 Dark Mode */
body.dark-mode {
  --bg-gradient: linear-gradient(135deg, #141e30, #243b55);
  --text-color: #fff;
  --card-bg: rgba(255, 255, 255, 0.1);
  --accent-color: #00d4ff;
  --accent-gradient: linear-gradient(90deg, #00d4ff, #a8ff78);
  --footer-color: #aaa;
}

/* 🧱 Body Styling */
body {
  background: var(--bg-gradient);
  color: var(--text-color);
  min-height: 100vh;
}

/* 🌈 Blog Header Section */
.blog-header {
  background: linear-gradient(135deg, #0028ff, #4795ff, #5fa9ff);
  color: white;
  padding: 7rem 2rem 10rem;
  position: relative;
  overflow: hidden;
}

/* ✨ Blog Heading - Centered Top */
.blog-heading {
 font-size: 3.5rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin-bottom: 3.5rem; /* Increased space below heading */
  margin-top: -14rem; /* Moves heading slightly upward */ /* Gives clean space between heading and search */

}

.search-container {
  display: flex;
  justify-content: flex-end; /* push it fully to the right */
  width: 100%;
  position: absolute; /* position it inside the header */
  top:-7rem;          /* adjust vertical placement */
  right:-4rem;        /* distance from right edge */
  z-index: 10;
}

/* 💎 Search Bar Box */
.search-bar {
  position: relative;
  display: flex;
  align-items: center;
  width: 370px; /* fixed clean width */
  border: 2px solid #fff;
  border-radius: 50px;
  padding: 0.8rem 2rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
}



/* ✨ Hover effect */
.search-bar:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Input */
.search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 1rem;
  padding-left: 0.5rem;
}

.search-bar input::placeholder {
  color: rgba(255, 255, 255, 0.9);
}

.search-icon {
  color: #fff;
  font-size: 1.2rem;
}

/* 🧱 Blog Cards Section */
.blog-grid {
  margin-top: -17rem; /* overlap effect */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 0 2rem 5rem;
  position: relative;
  z-index: 2;
}

/* 📱 Responsive Fix */
@media (max-width: 768px) {
  .blog-heading {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    margin-top: -40%;
  }

  .search-container {
    position: static;
    justify-content: center;
    margin-top: 1.5rem;
    right: 0;
  }


  .blog-header {
    padding: 6rem 1rem 8rem;
  }

  .blog-grid {
    margin-top: -12rem;
    margin-bottom: 3rem;
  }
}





.blog-header p {
  color: #666;
  margin-top: 0.5rem;
  font-size: 1.1rem;
}

/* 🧩 Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 0rem 12rem 7rem;
  max-width: 1600px;
  
  justify-items: center;
}

/* 📦 Blog Card */
.blog-card {
  width: 100%;
  max-width: 480px;
  background: var(--card-bg);
   border-radius: 4rem 5rem 4rem 5rem;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
  cursor: pointer;
   display: flex;
  flex-direction: column;
  justify-content: space-between; /* pushes footer (author + read more) down */
  height: 100%;
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.35);
}

/* 🖼️ Blog Card Image */
.blog-card img {
  width: 100%;
  height: auto;               /* maintain real proportions */
  max-height: 390px;          /* keeps layout clean */
  object-fit: contain;        /* show full image without cropping */
  background-color: #fff;
  border-radius: 4rem 5rem 4rem 5rem;
  display: block;
}

/* 📄 Blog Card Text */
.blog-card-content {
  padding: 1.5rem;
   flex: 1; /* fills vertical space */
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* ensures top and bottom separation */
  height: 100%;
}

.blog-card-content h2 {
  color: black;
  margin-bottom: 0.8rem;
}

.blog-card-content p {
  color: var(--text-color);
  opacity: 0.85;
  line-height: 1.6;
}





.blog-header {
  height: 70vh; /* Half of the viewport height */
  background-image: url('../images/bg_IMAGE.png'); /* replace with your actual image path */
  background-size: cover;      /* fill area, crop slightly if needed */
  background-position: center;  /* center focus */
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  text-align: center;
  color: white;
}

.author-section {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: auto;
}

/* ✅ Clean circular image fix */
.blog-card .author-img {
  width: 42px !important;            /* equal width & height */
  height: 42px !important;           /* keep same for perfect circle */
  border-radius: 50% !important;     /* make it perfectly round */
  object-fit: cover !important;      /* zoom & center the face */
  object-position: center top !important; /* show top part better */
  border: 2px solid rgba(25, 91, 233, 0.3);
  box-shadow: 0 0 6px rgba(25, 91, 233, 0.15);
  background: #fff;
  display: inline-block;
  overflow: hidden;                  /* hides overflow edges */
}


/* ✍️ Author Name */
.author-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--accent-color);
  white-space: nowrap;
  display: inline-block;
}



/* 🔗 Read More Link */
.read-more {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 500;
  color: var(--accent-color);
  text-decoration: none;
  transition: all 0.3s ease;
  margin-left: 23px;
}

.read-more i {
  font-size: 0.95rem;
  margin-left: 5px;
  transition: transform 0.3s ease;
}

.read-more:hover i {
  transform: translateX(4px);
}


/* 📱 Responsive Fix for Mobile Blog Cards */
@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr !important; /* single column layout */
    padding: 0rem 1rem;
    gap: 2.5rem;
    justify-items: center;
  }

  .blog-card {
    max-width: 95%;
    min-height: auto; /* let height adjust naturally */
  }

  .blog-card img {
    height: 220px; /* balanced mobile size */
    object-fit: cover;
    border-radius: 2rem 2rem 2rem 2rem;
  }

  .blog-card-content {
    padding: 1.2rem;
  }

  .blog-card-content h2 {
    font-size: 1.3rem;
    line-height: 1.4;
  }

  .blog-card-content p {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .author-section {
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.8rem;
  }

  .author-img {
    width: 36px !important;
    height: 36px !important;
  }

  .read-more {
    margin-left: 25px;
    font-size: 0.95rem;
  }
}

/* ✨ Smooth Entrance Animations */
.blog-header {
  animation: fadeInDown 1s ease-in-out both;
}

.blog-heading {
  animation: fadeInUp 1.3s ease-in-out both;
  animation-delay: 0.5s; /* after header appears */
}

.search-bar {
  animation: fadeIn 1.3s ease-in-out both;
  animation-delay: 0.8s; /* after heading */
}

/* 🪄 Blog Cards Animate Sequentially */
.blog-card {
  opacity: 0;
  transform: translateY(40px);
  animation: cardFadeUp 0.9s ease-in-out forwards;
}

/* Apply delay to each card for a staggered effect */
.blog-card:nth-child(1) { animation-delay: 1.4s; }
.blog-card:nth-child(2) { animation-delay: 1.6s; }
.blog-card:nth-child(3) { animation-delay: 1.8s; }
.blog-card:nth-child(4) { animation-delay: 2.0s; }
.blog-card:nth-child(5) { animation-delay: 2.2s; }
.blog-card:nth-child(6) { animation-delay: 2.4s; }

/* 🧠 If you have more cards, just continue pattern... */

/* 💨 Keyframes */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cardFadeUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 🌟 Navbar subtle fade on scroll */
.navbar {
  animation: fadeInDown 1s ease-in-out;
}

/* Button hover animation */
.get-in-touch-btn {
  transition: all 0.4s ease;
}
.get-in-touch-btn:hover {
  background: var(--accent-gradient);
  color: #fff !important;
  transform: translateY(-2px);
}

/* Footer Fade In */
footer {
  animation: fadeInUp 1.2s ease-in-out;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}/* 🔁 Trigger animations only when in view */
.blog-header.animate {
  animation: fadeInDown 1s ease-in-out both;
}

.blog-heading.animate {
  animation: fadeInUp 1.3s ease-in-out both;
  animation-delay: 0.5s;
}

.search-bar.animate {
  animation: fadeIn 1.3s ease-in-out both;
  animation-delay: 0.8s;
}

.blog-card.animate {
  opacity: 1;
  transform: translateY(0);
  animation: cardFadeUp 0.9s ease-in-out forwards;
}

/* Optional: adjust staggered delays */
.blog-card.animate:nth-child(1) { animation-delay: 0.1s; }
.blog-card.animate:nth-child(2) { animation-delay: 0.2s; }
.blog-card.animate:nth-child(3) { animation-delay: 0.3s; }
.blog-card.animate:nth-child(4) { animation-delay: 0.4s; }
.blog-card.animate:nth-child(5) { animation-delay: 0.5s; }
.blog-card.animate:nth-child(6) { animation-delay: 0.6s; }

footer.animate {
  animation: fadeInUp 1.2s ease-in-out;
}

::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #0078ff;
}

/* 📱 Tablet / iPad Responsive Fix */
@media (min-width: 769px) and (max-width: 1199px) {
  /* Header Section */
 
  /* Blog Grid – 2 columns for iPad */
  .blog-grid {
    grid-template-columns: repeat(3, 1fr) !important;
        gap: 2.5rem !important;
        padding: 170px 5rem 2rem !important;
        margin-top: -24rem !important;
        justify-items: center !important;
  }

  /* Blog Cards – clean spacing & readable size */
  .blog-card {
    max-width: 100% !important;
    border-radius: 3rem 3.5rem 3rem 3.5rem !important;
  }

.blog-card img {
  width: 100%;
  height: auto;               /* maintain real proportions */
  max-height: 250px;          /* keeps layout clean */
  object-fit: contain;        /* show full image without cropping */
  background-color: #fff;
  border-radius: 0rem 0rem 4rem 5rem;
  display: block;
  }

  /* Author & text adjustments */
  .blog-card-content {
    padding: 1.0rem 1.0rem !important;
  }

  .blog-card-content h2 {
    font-size: 1.0rem !important;
  }

  .blog-card-content p {
    font-size: 1rem !important;
    line-height: 1.6 !important;
  }

  .read-more {
    margin-left: 18px !important;
  }
}
/* 📌 Perfect scaling for small laptops (13–14 inch screens) */
/* 📌 Perfect scaling for small laptops (13–14 inch screens) */
@media (max-width: 1400px) and (min-width: 1024px) {

  .blog-heading {
    transform: scale(0.85);
    margin-top: -10rem;
  }

  .search-container {
    transform: scale(0.85);
    top: -8rem;
    right: -2rem; /* keeps search aligned */
  }
 .blog-grid {
  margin-top: -16rem; /* overlap effect */
  display: grid;
  grid-template-columns: repeat(minmax(1fr));
  gap: 2rem;
  padding: 3rem 9rem 9rem;
  position: relative;
  z-index: 2;
}

.search-container {
  display: flex;
  justify-content: flex-end; /* push it fully to the right */
  width: 100%;
  position: absolute; /* position it inside the header */
  top:-5rem;          /* adjust vertical placement */
  right:-6rem;        /* distance from right edge */
  z-index: 10;
}

/* 💎 Search Bar Box */
.search-bar {
  position: relative;
  display: flex;
  align-items: center;
  width: 280px; /* fixed clean width */
  border: 2px solid #fff;
  border-radius: 50px;
  padding: 0.4rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
}
.blog-card img {
    height: 220px; /* balanced mobile size */
    object-fit: cover;
    border-radius: 3rem 3rem 3rem 4rem;
  }

  .blog-card-content {
    padding: 1.2rem;
  }

  .blog-card-content h2 {
    font-size: 1.3rem;
    line-height: 1.4;
  }

  .blog-card-content p {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .author-section {
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.8rem;
  }

  .author-img {
    width: 36px !important;
    height: 36px !important;
  }
.search-bar input {

  font-size: 0.8rem;
  padding-left: 0.5rem;
}



}


