/* ==========================================================================
   BhashaIndia.in - Master Design System & Core Stylesheet
   Theme: Microsoft-Inspired Clean Modern Theme (#0067B8 Azure Blue, #F2F2F2 Light Footer)
   Typography: Google's Hind
   Layout: Full-Screen PC Coverage (Fluid Max-Width 1720px / 96%)
   ========================================================================== */

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

:root {
  /* Microsoft Brand Colors */
  --ms-blue: #0067B8;
  --ms-blue-hover: #004E8C;
  --ms-blue-active: #003865;
  --ms-blue-light: #EFF6FC;
  --ms-blue-border: #C7E0F4;
  --ms-cyan: #0078D4;

  /* Microsoft Neutral Palette */
  --text-headline: #1B1B1B;
  --text-primary: #242424;
  --text-secondary: #505050;
  --text-tertiary: #616161;
  --text-muted: #737373;
  --text-inverse: #FFFFFF;

  --bg-body: #FAFBFD;
  --bg-surface: #FFFFFF;
  --bg-surface-elevated: #FFFFFF;
  --bg-surface-alt: #F4F6F9;
  --bg-hero: radial-gradient(ellipse 95% 65% at 50% 30%, #DDF0FA 0%, #ECF6FD 45%, #FAFBFD 100%);

  --border-subtle: #E5E9EE;
  --border-medium: #D1D7E0;
  --border-focus: #0067B8;

  /* Hero & Modified Design Palette */
  --navy: #10274b;
  --blue: #096bc4;
  --blue-dark: #0758a1;
  --sky: #eaf5ff;
  --sky-2: #f5faff;
  --ink: #16233a;
  --muted: #66758a;
  --line: #dbe5ef;
  --cream: #fffaf2;
  --orange: #f57c16;
  --green: #16824a;
  --violet: #7b4bd3;
  --serif: 'Noto Serif Devanagari', Georgia, serif;

  /* Status Badges */
  --badge-green-bg: #E6F4EA;
  --badge-green-text: #137333;
  --badge-green-border: #CEEAD6;

  --badge-blue-bg: #E8F0FE;
  --badge-blue-text: #1A73E8;
  --badge-blue-border: #D2E3FC;

  --badge-orange-bg: #FEF7E0;
  --badge-orange-text: #B06000;
  --badge-orange-border: #FEEFC3;

  --badge-purple-bg: #F3E8FD;
  --badge-purple-text: #7627BB;
  --badge-purple-border: #E9D2FD;

  /* Soft Elevation Shadows (Microsoft Fluent Style) */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 3px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 8px 24px rgba(0, 103, 184, 0.12);

  /* Radius (Smooth Fluent Corners) */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 9999px;

  /* Typography Scale - Hind Font (Optimized & Compact) */
  --font-base: 'Hind', sans-serif;
  --font-indic: 'Hind', sans-serif;
  
  --font-size-scale: 1;
  --font-xs: calc(0.8125rem * var(--font-size-scale));  /* 13px */
  --font-sm: calc(0.9375rem * var(--font-size-scale));   /* 15px */
  --font-base-size: calc(1.0625rem * var(--font-size-scale)); /* 17px */
  --font-lg: calc(1.1875rem * var(--font-size-scale));   /* 19px */
  --font-xl: calc(1.375rem * var(--font-size-scale));    /* 22px */
  --font-2xl: calc(1.75rem * var(--font-size-scale));    /* 28px */
  --font-3xl: calc(2.25rem * var(--font-size-scale));    /* 36px */
  --font-4xl: calc(2.75rem * var(--font-size-scale));    /* 44px */

  --line-height-normal: 1.5;
  --line-height-relaxed: 1.62;
  --container-max-width: 1720px; /* Full screen wide PC coverage */
  --container-padding: 36px;
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-base);
  font-size: var(--font-base-size);
  line-height: var(--line-height-normal);
  color: var(--text-primary);
  background-color: var(--bg-body);
  overflow-x: hidden;
}

/* Full Width Fluid Container for PC */
.container {
  width: 96%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

@media (max-width: 768px) {
  .container {
    width: 100%;
    padding-left: 18px;
    padding-right: 18px;
  }
}

.section {
  padding-top: 64px;
  padding-bottom: 64px;
  position: relative;
}

.section-alt {
  background-color: var(--bg-surface-alt);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-soft-blue {
  background-color: #F4F8FD;
  border-top: 1px solid #E2ECF7;
  border-bottom: 1px solid #E2ECF7;
}

/* Section Header */
.section-header {
  text-align: center;
  max-width: 960px;
  margin: 0 auto 40px auto;
}

.section-header.text-left {
  text-align: left;
  margin-left: 0;
}

.section-title {
  font-size: var(--font-2xl);
  font-weight: 700;
  color: var(--text-headline);
  line-height: 1.25;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: var(--font-base-size);
  color: var(--text-secondary);
  line-height: var(--line-height-relaxed);
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-headline);
  font-family: var(--font-base);
  font-weight: 700;
}

p {
  color: var(--text-secondary);
  margin-bottom: 0.85rem;
}

a {
  color: var(--ms-blue);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--ms-blue-hover);
}

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

/* Buttons (Microsoft Style) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-base);
  font-size: var(--font-sm);
  font-weight: 600;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--ms-blue);
  color: #FFFFFF;
}

.btn-primary:hover {
  background-color: var(--ms-blue-hover);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 103, 184, 0.3);
}

.btn-secondary {
  background-color: #242424;
  color: #FFFFFF;
}

.btn-secondary:hover {
  background-color: #000000;
  color: #FFFFFF;
}

.btn-outline {
  background-color: transparent !important;
  border: 1px solid #D1E3F5;
  color: var(--ms-blue);
}

.btn-outline:hover {
  border-color: var(--ms-blue) !important;
  background-color: transparent !important;
  color: var(--ms-blue-hover);
}

.btn-sm {
  font-size: 14px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  font-size: var(--font-base-size);
  padding: 13px 28px;
  border-radius: var(--radius-sm);
}

/* Status Badges - Clean Unified Style (Transparent, Blue text, Blue border on hover) */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  background-color: transparent !important;
  color: var(--ms-blue) !important;
  border: 1px solid #D1E3F5 !important;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.status-badge:hover {
  border-color: var(--ms-blue) !important;
  color: var(--ms-blue-hover) !important;
}

.badge-free-tool,
.badge-ai-tool,
.badge-download,
.badge-paid-software,
.badge-guide,
.badge-video {
  background-color: transparent !important;
  color: var(--ms-blue) !important;
  border: 1px solid #D1E3F5 !important;
}

.badge-free-tool:hover,
.badge-ai-tool:hover,
.badge-download:hover,
.badge-paid-software:hover,
.badge-guide:hover,
.badge-video:hover {
  border-color: var(--ms-blue) !important;
  color: var(--ms-blue-hover) !important;
}

/* Card Base - Reduced by ~15% (Compact & Refined) */
.bhasha-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px; /* Reduced by ~15% from 34px */
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  position: relative;
}

.bhasha-card:hover {
  transform: translateY(-3px);
  border-color: var(--ms-blue-border);
  box-shadow: var(--shadow-card-hover);
}

.bhasha-card-title {
  font-size: 19px; /* Reduced by ~15% from 23px */
  font-weight: 700;
  color: var(--text-headline);
  margin-top: 10px;
  margin-bottom: 8px;
  line-height: 1.32;
}

.bhasha-card-desc {
  font-size: 15px; /* Reduced by ~15% from 17px */
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}

/* ==========================================================================
   Microsoft-Inspired Subtle Corner Gradients on Cards
   3 Alternating Gradients (Cyan/Azure, Soft Violet, Soft Mint/Amber)
   ========================================================================== */
.card-grad-1,
.hero-popular-grid > :nth-child(3n+1),
.hero-capabilities-grid > :nth-child(3n+1),
.tools-showcase-grid > :nth-child(3n+1),
.pillars-grid > :nth-child(3n+1),
.fonts-specimen-grid > :nth-child(3n+1),
.software-grid > :nth-child(3n+1),
.platform-guides-grid > :nth-child(3n+1),
.videos-grid > :nth-child(3n+1),
.personas-grid > :nth-child(3n+1) {
  background: #FFFFFF radial-gradient(circle at 100% 0%, rgba(0, 120, 212, 0.12) 0%, rgba(0, 164, 239, 0.05) 35%, rgba(255, 255, 255, 0) 65%);
}

.card-grad-2,
.hero-popular-grid > :nth-child(3n+2),
.hero-capabilities-grid > :nth-child(3n+2),
.tools-showcase-grid > :nth-child(3n+2),
.pillars-grid > :nth-child(3n+2),
.fonts-specimen-grid > :nth-child(3n+2),
.software-grid > :nth-child(3n+2),
.platform-guides-grid > :nth-child(3n+2),
.videos-grid > :nth-child(3n+2),
.personas-grid > :nth-child(3n+2) {
  background: #FFFFFF radial-gradient(circle at 100% 0%, rgba(135, 100, 245, 0.12) 0%, rgba(180, 140, 255, 0.05) 35%, rgba(255, 255, 255, 0) 65%);
}

.card-grad-3,
.hero-popular-grid > :nth-child(3n),
.hero-capabilities-grid > :nth-child(3n),
.tools-showcase-grid > :nth-child(3n),
.pillars-grid > :nth-child(3n),
.fonts-specimen-grid > :nth-child(3n),
.software-grid > :nth-child(3n),
.platform-guides-grid > :nth-child(3n),
.videos-grid > :nth-child(3n),
.personas-grid > :nth-child(3n) {
  background: #FFFFFF radial-gradient(circle at 100% 0%, rgba(0, 164, 239, 0.09) 0%, rgba(255, 185, 0, 0.08) 35%, rgba(255, 255, 255, 0) 65%);
}

/* ==========================================================================
   Reveal Animations
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1);
}
.reveal.in-view {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Site Header & Accessibility Utility Bar (Modified Design)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 2000;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid #e6edf4;
  transition: box-shadow 0.2s ease;
}
.site-header.scrolled {
  box-shadow: 0 6px 24px rgba(25, 59, 95, .07);
}

.utility-bar {
  height: 30px;
  background: #f6f9fc;
  border-bottom: 1px solid #edf2f7;
  color: #6b788a;
  font-size: 11px;
}
.utility-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.utility-actions {
  display: flex;
  gap: 5px;
}
.utility-actions button {
  border: 0;
  background: transparent;
  color: #5e6c7d;
  font-size: 11px;
  padding: 2px 5px;
  border-radius: 5px;
  cursor: pointer;
}
.utility-actions button:hover,
.utility-actions button.active {
  color: var(--blue);
  background: #e8f3ff;
}

.nav-shell {
  height: 76px;
  position: relative;
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.45vw, 28px);
}
.brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  text-decoration: none;
}
.brand-beta-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0284c7 0%, #0067b8 100%);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-left: 6px;
  line-height: 1.2;
  box-shadow: 0 1px 3px rgba(0, 103, 184, 0.28);
  vertical-align: middle;
  flex-shrink: 0;
  user-select: none;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.brand:hover .brand-beta-tag,
.footer-brand-wrap a:hover .brand-beta-tag {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.brand-logo {
  width: clamp(300px, 11.7vw, 298px);
  height: auto;
  display: block;
}
.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(6px, 0.72vw, 15px);
  flex: 1;
}
.main-nav a {
  font-size: clamp(11px, 0.70vw, 13.5px);
  color: #1e2b3b;
  white-space: nowrap;
  position: relative;
  padding: 8px 0;
  text-decoration: none;
  font-weight: 500;
}
.main-nav a:after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 1px;
  height: 2px;
  background: var(--blue);
  transition: right 0.2s ease;
}
.main-nav a:hover {
  color: var(--blue);
}
.main-nav a:hover:after {
  right: 0;
}
.header-search-btn {
  width: clamp(36px, 2.1vw, 40px);
  height: clamp(36px, 2.1vw, 40px);
  border-radius: 50%;
  border: 1px solid #dbe7f3;
  background: #eef6ff;
  color: var(--blue);
  font-size: clamp(23px, 1.4vw, 27px);
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 auto;
  border-style: solid;
}
.header-search-btn:hover {
  background: #e2f0fe;
}
.mobile-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid #dbe5ef;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s ease;
  z-index: 2002;
  flex-shrink: 0;
}
.mobile-menu-toggle:hover {
  background: #f4f8fc;
  border-color: var(--blue);
}
.mobile-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy);
  margin: 0 auto;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 1050px) {
  .main-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
    margin-left: auto;
  }
  .header-search-btn {
    margin-left: auto;
  }
  .main-nav.is-open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    padding: 14px 6% 20px;
    border-bottom: 3px solid var(--blue);
    box-shadow: 0 20px 48px rgba(16, 39, 75, 0.16);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    z-index: 2001;
    max-height: calc(100vh - 75px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: mobileNavSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  }
  @keyframes mobileNavSlideDown {
    from {
      opacity: 0;
      transform: translateY(-8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  .main-nav.is-open a {
    padding: 12px 6px;
    font-size: 15px;
    font-weight: 500;
    color: #1e2b3b;
    border-bottom: 1px solid #edf2f7;
    white-space: normal;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
  }
  .main-nav.is-open a:last-child {
    border-bottom: none;
  }
  .main-nav.is-open a:hover,
  .main-nav.is-open a:active {
    color: var(--blue);
    background: #f4f8fd;
    padding-left: 12px;
  }
  .main-nav.is-open a:after {
    display: none;
  }
}

@media (max-width: 700px) {
  .utility-bar {
    display: none;
  }
  .nav-shell {
    height: 68px;
  }
  .brand-logo {
    width: 185px;
  }
  .brand-beta-tag {
    font-size: 8.5px;
    padding: 1.5px 5px;
    margin-left: 5px;
  }
  .header-search-btn {
    display: none;
  }
}

@media (max-width: 430px) {
  .brand-logo {
    width: 160px;
  }
  .brand-beta-tag {
    font-size: 8px;
    padding: 1px 4px;
    margin-left: 4px;
  }
}
