/* ========================================
   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;
  --medium-text: #555;
  --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: var(--medium-text);
}

a {
  text-decoration: none;
  color: var(--primary-color); /* Blue links */
  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 (Standard)
   ======================================== */
   /* --- 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-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 { display: none; font-size: 2rem; background: none; border: none; color: var(--primary-color); cursor: pointer; z-index: 1002; }

/* ========================================
   RESOURCES HERO
   ======================================== */
.resources-hero {
  padding: 6rem 1rem;
  background: linear-gradient(rgba(10, 74, 143, 0.8), rgba(10, 74, 143, 0.8)), url('resources-hero-bg.jpeg') no-repeat center center/cover; /* <<< ADD HERO BACKGROUND IMAGE */
  color: var(--light-text);
  text-align: center;
}
.hero-content .hero-title {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--light-text);
}
.hero-content .hero-subtext {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 700px;
  margin: 0 auto;
}

/* ========================================
   TOOLS SECTION (Quick Links Tiles)
   ======================================== */
.tools-section {
  padding: 4rem 0;
}
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.tool-tile {
  display: block; /* Make the anchor a block */
  height: 250px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background-size: cover;
  background-position: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--light-text); /* Text color for overlay */
  text-decoration: none; /* Remove underline from link */
}

.tool-tile img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform 0.4s ease;
}


.tool-tile:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
.tool-tile:hover img {
    transform: scale(1.05); /* Zoom image on hover */
}


.tile-overlay {
  position: absolute;
  inset: 0; /* Cover the entire tile */
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 20%, rgba(0, 0, 0, 0) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* Align text to bottom */
  padding: 1.5rem;
  z-index: 2; /* Ensure overlay is above image */
  transition: background 0.3s ease;
}

.tool-tile:hover .tile-overlay {
   background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 30%, rgba(0, 0, 0, 0.1) 100%);
}


.tile-overlay h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--light-text); /* Ensure heading is white */
}

.tile-overlay p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9); /* Lighter text color */
    margin: 0;
}

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

.blog-grid { /* Reusing blog grid for consistency */
  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;
}
.card-content { /* Added wrapper for text content */
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-post-card h3 {
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}
.card-content p {
    font-size: 0.95rem;
    color: var(--medium-text);
    margin-bottom: 1rem;
    flex-grow: 1; /* Pushes button down */
}


.blog-post-card .read-more {
  display: inline-block;
  align-self: flex-start; /* Align button to the left */
  color: var(--accent-color); /* Red link */
  font-weight: 600;
  text-decoration: none;
  margin-top: auto; /* Pushes to bottom */
}

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

/* ========================================
   CONTACT CTA (Standard)
   ======================================== */
.cta-section { padding: 5rem 0; background: url('cta-bg.jpeg') no-repeat center center/cover; position: relative; }
.cta-overlay { background-color: rgba(10, 74, 143, 0.9); padding: 5rem 0; }
.cta-content { position: relative; z-index: 2; max-width: 600px; margin: 0 auto; text-align: center; width: 90%; }
.cta-content h2 { font-size: 2.5rem; color: var(--light-text); margin-bottom: 2rem; }
.lead-form { display: grid; grid-template-columns: 1fr; gap: 1rem; } /* Added */
.lead-form input, .lead-form textarea { width: 100%; padding: 1rem; font-family: 'Montserrat', sans-serif; font-size: 1rem; font-weight: 500; background-color: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.3); color: var(--light-text); border-radius: 5px; transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease; }
.lead-form input::placeholder, .lead-form textarea::placeholder { color: rgba(255, 255, 255, 0.7); opacity: 1; }
.lead-form input:focus, .lead-form textarea:focus { outline: none; background-color: rgba(255, 255, 255, 0.2); border-color: var(--secondary-color); box-shadow: 0 0 10px rgba(243, 156, 18, 0.5); }
.lead-form textarea { min-height: 120px; resize: vertical; }
.lead-form button[type="submit"] { background-color: var(--secondary-color); color: #000000; font-size: 1.1rem; font-weight: 700; padding: 0.9rem; border: none; border-radius: 5px; cursor: pointer; transition: background-color 0.3s ease, transform 0.3s ease; margin-top: 1rem; }
.lead-form button[type="submit"]:hover { background-color: #e67e22; transform: translateY(-3px); }

/* ========================================
   FOOTER (Standard)
   ======================================== */
.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: 1rem; }
.footer-contact-item img { width: 40px; height: 40px; filter: invert(1); margin-top: 5px; flex-shrink: 0; }
.footer-contact-item ul { padding-left: 0; list-style: none; margin: 0; }
.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: #bdc3c7; 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 .hero-title { font-size: 2.5rem; }
  
  .tool-grid { grid-template-columns: 1fr; } /* Stack tool tiles on tablet */
  .blog-grid { grid-template-columns: repeat(2, 1fr); } 

  .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 .hero-title { font-size: 2rem; }
  .hero-content .hero-subtext { font-size: 1.1rem; }
  
  .tool-grid { grid-template-columns: 1fr; } 
  .blog-grid { grid-template-columns: 1fr; } 

  .footer-bottom { font-size: 0.8rem; }
}