:root {
  --primary: #2A4B8C;
  --secondary: #FF6B6B;
  --accent: #FFD166;
  --success: #06D6A0;
  --bg: #F9FAFB;
  --text: #1E293B;
  --text-light: #64748B;
  --border: #E2E8F0;
  --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-2: linear-gradient(45deg, #FF6B6B, #FFD166);
  --gradient-3: linear-gradient(90deg, #06D6A0, #118AB2);
  --card-bg: #FFFFFF;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ----- Reset & Base ----- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Open Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: clamp(0.95rem, 2.5vw, 1rem);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ----- Typography ----- */
h1, h2, h3, h4 {
  font-family: 'Montserrat', sans-serif;
  color: var(--primary);
  margin-top: 0;
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 7vw, 3.2rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

h3 {
  font-size: clamp(1.2rem, 4vw, 1.6rem);
  margin: 1.8rem 0 0.8rem;
}

p {
  margin-bottom: 1.2rem;
  line-height: 1.7;
}

/* ----- Container ----- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
  width: 100%;
}

/* ----- Header & Navigation ----- */
header {
  background: white;
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  width: 100%;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem clamp(1rem, 3vw, 2rem);
  min-height: 70px;
}

.logo {
  font-size: clamp(1.5rem, 4vw, 2rem);
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

/* Desktop Navigation - Only for large screens */
nav {
  display: flex;
  gap: clamp(0.8rem, 1.5vw, 1.2rem);
  align-items: center;
}

nav a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

nav a:hover {
  color: var(--primary);
  background: rgba(30, 58, 138, 0.05);
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 8px;
  z-index: 1001;
  width: 40px;
  height: 40px;
  justify-content: center;
  align-items: center;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: 0.3s;
  display: block;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* ----- Hero Section ----- */
.hero {
  background: linear-gradient(135deg, #f0f9ff 0%, #c7d2fe 100%);
  color: #0f172a;
  text-align: center;
  padding: clamp(4rem, 15vw, 7rem) 0;
  position: relative;
  overflow: hidden;
  margin-bottom: 3rem;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path fill="%23FFD166" opacity="0.08" d="M0,0 L100,0 L100,100 Z"/></svg>');
  background-size: cover;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero h1 {
  margin-bottom: 1.5rem;
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  color: #334155;
  font-weight: 500;
  line-height: 1.5;
  margin: 0 auto 2rem;
  max-width: 700px;
}

/* ----- Blog/Article Pages Specific Styles ----- */
.article-content {
  padding: 2rem 0 3rem;
  max-width: 900px;
  margin: 0 auto;
}

.article-content h1 {
  margin-top: 1rem; /* Yeh heading ko thoda neechay layega */
  padding-top: 0.5rem;
}

.intro {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text);
  background: rgba(30, 58, 138, 0.03);
  padding: 1.5rem;
  border-radius: 12px;
  border-left: 4px solid var(--accent);
  margin-bottom: 2.5rem;
  font-weight: 500;
}

/* Images in Articles - Responsive Fix */
.image-gallery {
  margin: 2rem 0;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.image-gallery img {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.image-gallery img:hover {
  transform: scale(1.02);
}

/* Lists in Articles */
ul, ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.8rem;
  line-height: 1.6;
}

ul ul, ol ol {
  margin: 0.5rem 0;
}

/* Main Content */
main {
  flex: 1;
  padding-bottom: 3rem;
}

/* Articles Grid (Home Page) */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0 4rem;
}

/* Cards */
.card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  transition: all 0.3s ease;
  border-top: 4px solid var(--accent);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1.2rem;
}

.card h3 {
  margin-bottom: 0.8rem;
  color: var(--primary);
  line-height: 1.3;
  flex-grow: 1;
}

.card p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
  flex-grow: 2;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-2);
  color: white;
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
  width: fit-content;
  min-width: 140px;
  text-align: center;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 107, 107, 0.4);
}

/* Related Articles Grid */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.2rem;
  margin: 3rem 0 2rem;
}

.related-card {
  background: var(--bg);
  padding: 1.2rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border-left: 4px solid var(--success);
  text-align: left;
  display: block;
  font-weight: 600;
}

.related-card:hover {
  background: white;
  transform: translateX(5px);
  box-shadow: var(--shadow-md);
  color: var(--primary);
}

/* ----- Footer ----- */
footer {
  background: linear-gradient(135deg, #1E3A8A 0%, #3B82F6 100%);
  color: white;
  padding: 3rem 0 2rem;
  margin-top: auto;
}

footer .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

footer p {
  font-size: 0.95rem;
  opacity: 0.9;
  text-align: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* Social Links (About, Contact, etc.) */
.social {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 1rem 0 2rem;
}

.social a {
  color: white;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.15);
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  text-align: center;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.social a:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Footer Articles */
.footer-articles {
  background: rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.footer-articles h3 {
  color: white;
  margin-bottom: 1.2rem;
  font-size: 1.2rem;
  text-align: center;
}

.footer-articles a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  display: block;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.footer-articles a:hover {
  color: var(--accent);
  padding-left: 0.5rem;
}

.footer-articles a:last-child {
  border-bottom: none;
}

/* ----- Mobile Menu (Side Slide) ----- */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(3px);
}

.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100%;
  background: white;
  z-index: 1000;
  padding: 5rem 1.5rem 2rem;
  transition: right 0.3s ease;
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu a {
  display: block;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  padding: 1rem 1.2rem;
  margin: 0.4rem 0;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: 1rem;
  border-left: 3px solid transparent;
  text-align: left;
}

.mobile-menu a:hover {
  background: linear-gradient(90deg, rgba(102, 126, 234, 0.1), transparent);
  color: var(--primary);
  border-left-color: var(--primary);
  padding-left: 1.5rem;
}

.mobile-menu .close-menu {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--primary);
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.mobile-menu .close-menu:hover {
  background: rgba(30, 58, 138, 0.1);
}

/* ----- Media Queries ----- */

/* Desktop Large (2K+) */
@media (min-width: 2000px) {
  .container {
    max-width: 1600px;
  }
  
  .articles-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
  }
  
  .card {
    padding: 2rem;
  }
  
  .article-content {
    max-width: 1000px;
  }
}

/* Desktop (1201px and above) */
@media (min-width: 1201px) {
  .articles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  footer .container {
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
  }
  
  footer p {
    text-align: left;
    border: none;
    padding: 0;
  }
  
  .social {
    justify-content: center;
  }
  
  .footer-articles {
    justify-self: end;
    min-width: 250px;
  }
  
  /* Desktop par hamburger hide */
  .hamburger {
    display: none !important;
  }
  
  /* Desktop par navigation show */
  nav {
    display: flex !important;
  }
  
  /* Mobile menu hide on desktop */
  .mobile-menu-overlay,
  .mobile-menu {
    display: none !important;
  }
  
  .related-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tablet (769px to 1200px) */
@media (max-width: 1200px) and (min-width: 769px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hamburger {
    display: flex;
  }
  
  nav {
    display: none !important;
  }
  
  footer .container {
    grid-template-columns: 1fr 1fr;
  }
  
  .social {
    grid-column: 1 / -1;
    justify-content: center;
  }
  
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Blog images tablet fix */
  .image-gallery img {
    max-height: 400px;
  }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }
  
  nav {
    display: none !important;
  }
  
  .hero {
    padding: clamp(3rem, 12vw, 5rem) 0;
  }
  
  .hero h1 {
    font-size: clamp(2rem, 7vw, 3rem);
  }
  
  /* Blog page heading spacing for mobile */
  .article-content h1 {
    margin-top: 0.5rem;
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }
  
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .card {
    padding: 1.2rem;
  }
  
  .card img {
    height: 180px;
  }
  
  /* Blog images mobile fix - IMPORTANT */
  .image-gallery {
    margin: 1.5rem 0;
    border-radius: 8px;
  }
  
  .image-gallery img {
    max-height: 300px;
    width: 100%;
    height: auto;
    object-fit: contain;
    background: #f8f9fa;
  }
  
  footer .container {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  footer p {
    text-align: center;
    padding-bottom: 1.5rem;
  }
  
  .social {
    justify-content: center;
    margin: 1.5rem 0;
  }
  
  .social a {
    min-width: 100px;
    padding: 0.7rem 1.2rem;
    font-size: 0.85rem;
  }
  
  .footer-articles {
    margin-top: 1rem;
  }
  
  .related-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .intro {
    padding: 1.2rem;
    font-size: 1rem;
    line-height: 1.6;
  }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .hero {
    padding: 2.5rem 0;
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .article-content h1 {
    font-size: 1.6rem;
    margin-top: 0.3rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .card {
    padding: 1rem;
  }
  
  .card img {
    height: 160px;
  }
  
  /* Blog images small mobile fix */
  .image-gallery img {
    max-height: 250px;
  }
  
  .btn {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
    min-width: 120px;
  }
  
  .social {
    gap: 0.7rem;
  }
  
  .social a {
    min-width: 90px;
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }
  
  .mobile-menu {
    width: 280px;
  }
  
  .intro {
    padding: 1rem;
    font-size: 0.95rem;
  }
}

/* Very Small Mobile (360px and below) */
@media (max-width: 360px) {
  .logo {
    font-size: 1.3rem;
  }
  
  .hero h1 {
    font-size: 1.6rem;
  }
  
  .article-content h1 {
    font-size: 1.4rem;
  }
  
  .social a {
    min-width: 85px;
    padding: 0.5rem 0.8rem;
    font-size: 0.75rem;
  }
  
  .mobile-menu {
    width: 250px;
    padding: 4.5rem 1rem 1.5rem;
  }
  
  /* Blog images very small mobile fix */
  .image-gallery img {
    max-height: 200px;
  }
}

/* Print Styles */
@media print {
  .hero, footer, .hamburger, .btn, .social, .mobile-menu-overlay, .mobile-menu, .image-gallery {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
    font-size: 12pt;
  }
  
  .container {
    max-width: 100%;
    padding: 0;
  }
  
  .card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
  
  .article-content {
    padding: 0;
  }
  
  .related-grid {
    display: none;
  }
}