/* ========================================
   GLOBAL STYLES & VARIABLES
   ======================================== */

/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

:root {
  --primary-color: #0a4a8f;
  --secondary-color: #f39c12;
  --accent-color: #D90429; /* Red color */
  --dark-text: #333333;
  --light-text: #ffffff;
  --body-bg: #ffffff;
  --card-bg: #ffffff;
  --section-bg: #f9f9f9;
  --border-color: #eeeeee;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', sans-serif;
  line-height: 1.6;
  color: var(--dark-text);
  background-color: var(--body-bg);
  overflow-x: hidden;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
}

h2.section-title {
  font-size: 2.5rem;
  color: var(--accent-color); /* Red headings */
  text-align: center;
  margin-bottom: 3rem;
}

p {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: #555;
}

a {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s ease;
}

a:hover {
  opacity: 0.8;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

.section-separator {
  height: 1px;
  background-color: var(--border-color);
  margin: 4rem auto;
  width: 90%;
  max-width: 1200px;
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */
   /* --- ISRO Logo Styling --- */

.nav-links .isro-logo-item {
  display: flex;
  align-items: center;
  margin-left: 1.5rem; /* Space from "Tools" */
  padding: 0;
}

.isro-logo {
  height: 40px; /* This is the most important part! */
  width: auto;
  transition: transform 0.3s ease;
}

.isro-logo:hover {
  transform: scale(1.05);
}
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background-color: var(--card-bg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-left .logo-link {
  display: block;
}

.navbar-logo {
  height: 50px;
  width: auto;
}

.navbar-center {
  display: flex;
  justify-content: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links li {
  position: relative;
}

.nav-links a {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark-text);
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-color);
}

/* --- Dropdown Menu --- */
.dropdown-toggle::after {
  content: ' ▼';
  font-size: 0.7rem;
  display: inline-block;
  margin-left: 4px;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--card-bg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 240px;
  border-radius: 8px;
  padding: 0.5rem 0;
  z-index: 1001;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.dropdown-menu.open {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-menu li {
  width: 100%;
}

.dropdown-menu li a {
  display: block;
  padding: 0.75rem 1.5rem;
  width: 100%;
  font-weight: 500;
  white-space: nowrap;
}

.dropdown-menu li a:hover {
  background-color: #f4f4f4;
  color: var(--primary-color);
}

/* --- Hamburger Menu --- */
.hamburger {
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  z-index: 1002;
}

/* ========================================
   KNOWLEDGE CENTER HERO
   ======================================== */
.hero-section {
  padding: 6rem 1rem;
  background: linear-gradient(rgba(10, 74, 143, 0.8), rgba(10, 74, 143, 0.8)), url('kc-hero-bg.jpeg') no-repeat center center/cover; /* Add a background image */
  color: var(--light-text);
  text-align: center;
}
.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--light-text);
}
.hero-content p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 700px;
  margin: 0 auto;
}

/* ========================================
   CONTENT SECTIONS
   ======================================== */
.content-section {
  padding: 4rem 0;
}
.content-section.bg-light {
  background-color: var(--section-bg);
}

/* --- Blog Grid --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.blog-post-card {
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.blog-post-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.blog-post-card h3 {
  font-size: 1.3rem;
  color: var(--primary-color);
  padding: 1.5rem 1.5rem 1rem 1.5rem;
  flex-grow: 1; /* Pushes button down */
}

.blog-post-card .read-more {
  display: inline-block;
  color: var(--accent-color); /* Red link */
  font-weight: 600;
  padding: 0 1.5rem 1.5rem 1.5rem;
  text-decoration: none;
}

.blog-post-card .read-more:hover {
  text-decoration: underline;
  opacity: 0.8;
}

/* --- News List --- */
.news-list {
  max-width: 800px;
  margin: 0 auto;
}
.news-item {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
}
.news-date {
  font-weight: 600;
  color: var(--primary-color);
  flex-shrink: 0;
}
.news-item p {
  flex-grow: 1;
  margin: 0;
  font-weight: 500;
}
.news-item .read-more {
  color: var(--accent-color);
  font-weight: 600;
  text-decoration: none;
  flex-shrink: 0;
}
.news-item .read-more:hover {
  text-decoration: underline;
}

/* --- Terms Grid --- */
.terms-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
.terms-card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border: 1px solid var(--border-color);
}
.terms-card h3 {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}
.terms-card ul {
  margin-bottom: 1.5rem;
}
.terms-card ul li {
  margin-bottom: 0.75rem;
}
.terms-card ul li a {
  color: var(--dark-text);
  font-weight: 500;
  text-decoration: underline;
}
.terms-card ul li a:hover {
  color: var(--primary-color);
}
.terms-card .btn-more {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background-color: var(--accent-color); /* Red button */
  color: var(--light-text);
  border-radius: 4px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.3s ease;
}
.terms-card .btn-more:hover {
  background-color: #a10e25; /* Darker red */
  opacity: 1;
}

/* --- Websites List --- */
.websites-list {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border: 1px solid var(--border-color);
}
.websites-list ul {
  columns: 2; /* 2 columns for the list */
  column-gap: 2rem;
}
.websites-list li {
  margin-bottom: 0.75rem;
}
.websites-list a {
  color: var(--primary-color);
  text-decoration: underline;
  word-break: break-all;
}
.websites-list a:hover {
  color: var(--accent-color);
}

/* --- Presentation Grid --- */
.presentation-grid {
  display: grid;
  /* Only one item for now, but ready for more */
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  justify-items: center; /* Center the single card */
}

.presentation-card {
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  max-width: 400px; /* Limit width */
  text-align: center;
}

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

.presentation-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-color);
}

.presentation-card h3 {
  font-size: 1.3rem;
  color: var(--primary-color);
  margin: 1.5rem 1rem 0.5rem 1rem;
}

.presentation-card p {
  padding: 0 1.5rem 1rem 1.5rem;
  font-size: 0.95rem;
}

.presentation-card .btn-download {
  display: inline-block;
  margin: 0 auto 1.5rem auto;
  padding: 0.7rem 1.5rem;
  background-color: var(--accent-color); /* Red button */
  color: var(--light-text);
  border-radius: 4px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.presentation-card .btn-download:hover {
  background-color: #a10e25; /* Darker red */
  opacity: 1;
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
  background-color: #2c3e50;
  color: #ecf0f1;
  padding: 4rem 0 0 0;
}

.footer-container {
  width: 90%;
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-col h3,
.footer-col h4 {
  font-size: 1.2rem;
  color: var(--light-text);
  margin-bottom: 1.5rem;
  font-weight: 600;
  position: relative;
}

.footer-col h3::after,
.footer-col h4::after {
  content: '';
  display: block;
  width: 50px;
  height: 2px;
  background-color: var(--secondary-color);
  margin-top: 0.5rem;
}

.footer-col p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #bdc3c7;
  max-width: 350px;
}

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col ul li a {
  color: #bdc3c7;
  font-weight: 500;
  transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-col ul li a:hover {
  color: var(--light-text);
  padding-left: 5px;
  opacity: 1;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 1.5rem;
}
.footer-contact-item img {
  width: 40px;
  height: 40px;
  filter: invert(1);
  margin-top: 5px;
}
.footer-contact-item ul {
  padding-left: 0;
  list-style: none;
}
.footer-contact-item ul li {
  margin-bottom: 0.5rem;
}
.footer-contact-item a {
  color: #bdc3c7;
  font-weight: 500;
  word-break: break-all;
}
.footer-contact-item a:hover {
  color: var(--light-text);
  opacity: 1;
}

.footer-socials {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.footer-socials a {
  display: inline-block;
  width: 40px;
  height: 40px;
  background-color: #34495e;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.footer-socials a:hover {
  background-color: var(--secondary-color);
  transform: translateY(-4px);
  opacity: 1;
}

.footer-socials img {
  width: 20px;
  height: 20px;
  filter: invert(1);
}
.footer-socials a[aria-label="X"] img {
    width: 24px;
    height: 24px;
}

.footer-bottom {
  border-top: 1px solid #34495e;
  padding: 1.5rem 0;
  text-align: center;
  width: 90%;
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: #bdc3c7;
}

.footer-links a {
  color: #efe3e3;
  margin: 0 0.5rem;
}

.footer-links a:hover {
  color: var(--light-text);
  opacity: 1;
}

/* ========================================
   FLOATING BUTTONS & POPUP
   ======================================== */
/* Change this one to be lower down */
.whatsapp-float {
position: fixed;
bottom: 20px; /* <-- FIX 2: Changed from 100px to avoid overlap with Call button */
right: 20px;
width: 60px;
height: 60px;
background-color:white; /* A nice blue color */
color: white;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
font-size: 24px;
box-shadow: 0 0 15px rgba(37, 211, 102, 0.6); /* soft glow */
z-index: 99;
transition: transform 0.3s ease, background-color 0.3s ease;
cursor: pointer;
}
.whatsapp-float:hover {
transform: scale(1.1);
background-color: greenyellow;
}

.whatsapp-float img {
width: 30px;
height: 30px;

}
/* Floating Call Button */
/* Keep this one at 100px */
.call-float {
position: fixed;
bottom: 100px; /* Positioned 100px from the bottom */
right: 20px;
width: 60px;
height: 60px;
background-color:white;/* A nice blue color */
color: white;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
font-size: 24px;
box-shadow: 0 0 15px rgba(37, 135, 211, 0.6); /* soft glow */
z-index: 99;
 transition: transform 0.3s ease, background-color 0.3s ease; 
cursor: pointer;
border:none;
}
.call-float:hover {
transform: scale(1.1);
background-color: lightcyan;
}

.call-float img {
width: 50px;
height: 33px;
  
}

/* Pop-up Overlay */
.call-popup-overlay {
 display: none; /* Hidden by default */
position: fixed;
 top: 0;
left: 0;
 width: 100%;
 height: 100%;
 background-color: rgba(0, 0, 0, 0.6);
z-index: 100;
 backdrop-filter: blur(5px);
 -webkit-backdrop-filter: blur(5px);
animation: fadeIn 0.3s forwards;
}


/* Pop-up Box */
.call-popup-box {
 position: fixed;
 top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: white;
padding: 30px;
border-radius: 15px;
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
text-align: center;
width: 90%;
max-width: 400px;
}

/* Pop-up Heading */
.call-popup-box h3 {
font-size: 1.5rem;
font-weight: bold;
 color: #333;
 margin-bottom: 20px;
}

/* Phone number link in call-popup: FIXING VISIBILITY. Using theme red/blue for contrast against white background. */
.call-popup-box a,
.call-popup-box a:link,
.call-popup-box a:visited {
 /* Changed from `white !important` to a visible color. Using the blue from the floating button. */
color: #3B82F6 !important; 
text-decoration: none;
}

.call-popup-box a:hover,
.call-popup-box a:active {
/* Use a darker blue on hover for consistency */
color: #2563EB !important;
}


/* Close Button */
.close-btn {
position: absolute;
top: 10px;
right: 10px;
font-size: 24px;
color: #666;
cursor: pointer;
background: transparent;
line-height: 1;
padding: 5px;
}

/* General Animations */
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
/* ========================================
   RESPONSIVE - MEDIA QUERIES
   ======================================== */

/* --- Tablet (Medium Devices) --- */
@media (max-width: 992px) {
  .hamburger {
    display: block;
  }

  .navbar-center {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 350px;
    height: 100vh;
    background-color: var(--card-bg);
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.2);
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 6rem;
    transition: left 0.4s ease;
    z-index: 1001;
  }

  .navbar-center.open {
    left: 0;
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 0;
  }

  .nav-links li {
    width: 100%;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links a {
    display: block;
    width: 100%;
    padding: 1.25rem 2rem;
  }

  .dropdown-toggle::after {
    float: right;
  }
  
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border-radius: 0;
    min-width: 0;
    width: 100%;
    opacity: 1;
    transform: none;
    padding: 0;
    background-color: #f8f8f8;
  }
  .dropdown-menu.open {
    display: block;
  }
  .dropdown-menu li a {
    padding-left: 3rem;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .terms-grid {
    grid-template-columns: 1fr;
  }
  
  .websites-list ul {
    columns: 1; /* Single column on tablet */
  }

  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-col p {
    margin: 0 auto 1rem auto;
  }
  .footer-col h3::after,
  .footer-col h4::after {
    margin: 0.5rem auto 0 auto;
  }
  .footer-contact-item {
    justify-content: center;
    text-align: left;
  }
  .footer-socials {
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
  }
}

/* --- Mobile (Small Devices) --- */
@media (max-width: 576px) {
  h2.section-title {
    font-size: 2rem;
  }

  .hero-content h1 {
    font-size: 2rem;
  }
  .hero-content p {
    font-size: 1.1rem;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  .news-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .news-item .read-more {
    margin-top: 0.5rem;
  }
  
  .websites-list ul {
    columns: 1;
  }
  
  .footer-bottom {
    font-size: 0.8rem;
  }
}