/* -------------------------------------------------------------
   BLOCKLY ACADEMY - DESIGN SYSTEM & STYLES
   Developed and Maintained by 3rd Ain Smart Infotech
   ------------------------------------------------------------- */

/* Custom Properties & Variables */
:root {
  /* Light Mode Color Palette */
  --bg-dark: hsl(210, 30%, 97%);       /* Soft light background */
  --bg-card: hsla(0, 0%, 100%, 0.8);   /* White card with opacity */
  --bg-card-hover: hsla(0, 0%, 100%, 0.95);
  --border-color: hsla(215, 20%, 80%, 0.6); /* Soft border */
  --border-hover: hsla(244, 75%, 60%, 0.8);
  
  --primary: hsl(244, 75%, 55%);       /* Indigo/Violet */
  --secondary: hsl(195, 90%, 35%);     /* Deep Cyan */
  --accent: hsl(280, 75%, 45%);        /* Deep Magenta */
  
  --text-main: hsl(220, 30%, 12%);      /* Dark gray text */
  --text-muted: hsl(220, 15%, 42%);     /* Muted text */
  --text-dark: hsl(220, 15%, 8%);
  
  /* Font Families */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Utilities */
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
  --shadow-glow-us: 0 10px 30px rgba(59, 130, 246, 0.15);
  --shadow-glow-in: 0 10px 30px rgba(249, 115, 22, 0.15);
  --shadow-glow-violet: 0 15px 35px rgba(99, 102, 241, 0.15);
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: hsl(215, 20%, 80%);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Glowing Background Blobs */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -1;
  opacity: 0.2; /* reduced opacity for soft glow on light background */
  pointer-events: none;
  animation: float 20s infinite alternate ease-in-out;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: var(--primary);
  top: -150px;
  right: -50px;
}

.blob-2 {
  width: 600px;
  height: 600px;
  background: var(--accent);
  bottom: 20%;
  left: -200px;
  animation-duration: 25s;
}

.blob-3 {
  width: 400px;
  height: 400px;
  background: var(--secondary);
  top: 40%;
  right: -100px;
  animation-delay: -5s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(50px, 80px) scale(1.1);
  }
  100% {
    transform: translate(-30px, -40px) scale(0.95);
  }
}

/* Typography Helpers */
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* Navigation Bar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 0.65rem 2rem;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.85); /* Pure white glass background */
  transition: var(--transition-smooth);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--text-main);
  letter-spacing: -0.03em;
  background: none !important;
}

.logo-img {
  display: block !important;
  height: 4.2rem !important;
  width: auto !important;
  max-width: 260px !important;
  object-fit: contain !important;
  filter: drop-shadow(0 2px 8px rgba(115, 103, 240, 0.25)) !important;
  background: none !important;
}

.logo span span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-fast);
  position: relative;
}

.nav-link:hover {
  color: var(--text-main);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition-fast);
}

.nav-link:hover::after {
  width: 100%;
}

.btn-select-region {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  border: none;
  box-shadow: var(--shadow-glow-violet);
  font-weight: 600;
}

.btn-select-region:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px hsla(244, 75%, 63%, 0.3);
  color: #fff;
}

.btn-select-region::after {
  display: none;
}

/* Hero Section */
.hero-section {
  padding: 10rem 2rem 4rem;
  text-align: center;
  position: relative;
}

.hero-container {
  max-width: 800px;
  margin: 0 auto;
}

.hero-tag {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: hsla(244, 75%, 63%, 0.1);
  border: 1px solid rgba(115, 103, 240, 0.25);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2rem;
  backdrop-filter: blur(5px);
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  color: var(--text-main);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
}

.regions-section {
  padding: 8.5rem 2rem 2rem;
}

.regions-container {
  max-width: 1000px;
  margin: 0 auto;
}

.region-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
}

/* Region Cards */
.region-card {
  text-decoration: none;
  color: inherit;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  overflow: hidden;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: var(--transition-smooth);
  position: relative;
}

/* Subtle Card Glow Element */
.card-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
  z-index: 0;
}

.card-us .card-glow {
  background: radial-gradient(circle at 50% 0%, hsla(217, 89%, 61%, 0.15) 0%, transparent 70%);
}

.card-in .card-glow {
  background: radial-gradient(circle at 50% 0%, hsla(27, 96%, 61%, 0.15) 0%, transparent 70%);
}

/* Flags Layout */
.flag-container {
  width: 100%;
  height: 200px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.3);
  transition: var(--transition-smooth);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.flag-svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.card-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 1;
}

.region-tag {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-us .region-tag {
  color: hsl(217, 89%, 65%);
}

.card-in .region-tag {
  color: hsl(27, 96%, 65%);
}

.region-name {
  font-size: 1.8rem;
  color: var(--text-main);
  transition: var(--transition-fast);
}

.region-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  height: 4.5rem;
}

.card-action {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition-smooth);
}

.card-us .card-action {
  color: hsl(217, 89%, 65%);
}

.card-in .card-action {
  color: hsl(27, 96%, 65%);
}

.arrow-icon {
  transition: var(--transition-smooth);
}

/* Hover Physics for Region Cards */
.region-card:hover {
  transform: translateY(-8px);
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.region-card:hover .card-glow {
  opacity: 1;
}

.card-us:hover {
  box-shadow: var(--shadow-glow-us);
  border-color: hsla(217, 89%, 61%, 0.4);
}

.card-in:hover {
  box-shadow: var(--shadow-glow-in);
  border-color: hsla(27, 96%, 61%, 0.4);
}

.region-card:hover .flag-container {
  transform: scale(1.02);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.region-card:hover .flag-svg {
  transform: scale(1.05);
}

.region-card:hover .arrow-icon {
  transform: translateX(6px);
}

.about-section {
  padding: 1rem 2rem 3rem;
  background: linear-gradient(180deg, transparent 0%, rgba(100, 110, 140, 0.05) 100%);
}

.about-container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 1.75rem;
  line-height: 1.7;
}

.section-tag {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 2.8rem;
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

/* Feature Cards */
.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 2.5rem 2rem;
  border-radius: 20px;
  transition: var(--transition-smooth);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.about-icon-wrapper {
  width: 60px;
  height: 60px;
  background: hsla(244, 75%, 63%, 0.1);
  border: 1px solid rgba(115, 103, 240, 0.2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.75rem;
  transition: var(--transition-smooth);
}

.about-icon {
  font-size: 1.6rem;
  color: var(--secondary);
  transition: var(--transition-smooth);
}

.about-card-title {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.about-card-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* About Card Hover animations */
.about-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-glow-violet);
}

.about-card:hover .about-icon-wrapper {
  background: var(--primary);
  border-color: var(--primary);
  transform: rotate(-8deg) scale(1.05);
}

.about-card:hover .about-icon {
  color: #fff;
}

/* Footer Section */
.footer {
  border-top: 1px solid var(--border-color);
  background: #ffffff; /* Clean white footer matching the header */
  padding: 2.5rem 2rem 1.5rem; /* Tighter padding to reduce space */
  position: relative;
  z-index: 10;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  max-width: 500px;
  margin: 0 auto 1.5rem;
}

.footer-brand-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-separator {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
  margin-bottom: 1.5rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.copyright {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Developed and Maintained By 3rd Ain Smart Infotech styling */
.maintainer {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.maintainer-link {
  color: var(--secondary);
  text-decoration: none;
  font-weight: 600;
  position: relative;
  transition: var(--transition-fast);
}

.maintainer-link:hover {
  color: var(--accent);
  text-shadow: 0 0 10px hsla(280, 85%, 60%, 0.3);
}

.maintainer-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--secondary);
  transition: var(--transition-fast);
  transform: scaleX(0.7);
  transform-origin: left;
}

.maintainer-link:hover::after {
  background: var(--accent);
  transform: scaleX(1);
}

/* Mobile Navigation Base Styles */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 101;
}

.hamburger-bar {
  width: 100%;
  height: 3px;
  background-color: var(--text-main);
  border-radius: 4px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.3s ease;
}

.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 98;
}

.nav-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* Prevent scrolling when menu is active */
  body.menu-open {
    overflow: hidden;
  }

  .nav-toggle {
    display: flex;
  }
  
  .nav-toggle.active .hamburger-bar:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
    background-color: var(--primary);
  }
  
  .nav-toggle.active .hamburger-bar:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle.active .hamburger-bar:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
    background-color: var(--primary);
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: -10px 0 40px rgba(115, 103, 240, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    padding: 3rem 2rem;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 99;
  }
  
  .nav-links.active {
    right: 0;
  }

  .nav-link {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-main);
  }
  
  .btn-select-region {
    width: 100%;
    text-align: center;
    padding: 0.9rem 1.5rem;
    margin-top: 1rem;
  }

  .hero-title {
    font-size: 2.75rem;
  }
  
  .region-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
    gap: 2rem;
  }
  
  .about-section {
    padding: 4rem 1rem;
  }
  
  .section-title {
    font-size: 2.2rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.2rem;
  }
  
  .navbar {
    padding: 1rem 1.25rem;
  }
  
  .logo-img {
    height: 3.5rem !important;
  }

  .nav-links {
    gap: 2rem;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
  }
  
  .region-card {
    padding: 1.5rem;
  }
  
  .region-name {
    font-size: 1.5rem;
  }
  
  .flag-container {
    height: 160px;
  }
}

