:root {
  /* Brand Colors based on the logo gradient */
  --color-cyan: #00f2fe;
  --color-indigo: #4facfe;
  --color-purple: #a855f7;
  --color-deep-blue: #1e3a8a;
  --color-dark-bg: #0f172a;
  --color-soft-bg: #f8fafc;
  --color-text-main: #1e293b;
  --color-text-muted: #64748b;
  --color-white: #ffffff;

  /* Gradients */
  --gradient-primary: linear-gradient(
    135deg,
    var(--color-cyan) 0%,
    var(--color-indigo) 50%,
    var(--color-purple) 100%
  );
  --gradient-soft: linear-gradient(
    135deg,
    rgba(79, 172, 254, 0.1) 0%,
    rgba(168, 85, 247, 0.1) 100%
  );

  /* Typography */
  --font-primary: "Outfit", sans-serif;
  --font-secondary: "Inter", sans-serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 5rem;

  /* Transitions */
  --transition-smooth: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);

  /* Animations Constants */
  --reveal-offset: 100px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-secondary);
  color: var(--color-text-main);
  background-color: var(--color-white);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-primary);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
  word-wrap: break-word; /* Prevent long words from breaking layout on small screens */
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* Typography Utilities */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.section-title {
  font-size: clamp(2rem, 5vw, 2.5rem);
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.section-subtitle {
  display: block;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.75rem;
  color: var(--color-indigo);
  font-weight: 700;
  margin-bottom: var(--spacing-xs);
  text-align: center;
}

/* Animations Reveal System */
.reveal {
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  will-change: transform, opacity;
}

.reveal.active {
  opacity: 1;
  transform: translate(0, 0) scale(1) rotate(0);
  pointer-events: auto;
}

.reveal-up {
  transform: translateY(50px);
}
.reveal-down {
  transform: translateY(-50px);
}
.reveal-left {
  transform: translateX(-50px);
}
.reveal-right {
  transform: translateX(50px);
}
.reveal-zoom {
  transform: scale(0.9);
}
.reveal-rotate {
  transform: rotate(-5deg) scale(0.9);
}

@keyframes whiteboardPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(79, 172, 254, 0.4);
  }
  70% {
    transform: scale(1.02);
    box-shadow: 0 0 0 10px rgba(79, 172, 254, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(79, 172, 254, 0);
  }
}

.whiteboard-illustration {
  border: 2px dashed var(--color-indigo);
  border-radius: 16px;
  background: var(--color-soft-bg);
  padding: 2rem;
  animation: whiteboardPulse 3s infinite;
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-primary);
  border: none;
  transition: var(--transition-smooth);
  min-height: 48px; /* Minimum tap target */
  min-width: 48px;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--color-white);
  box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
}

.btn-secondary {
  background: var(--color-white);
  color: var(--color-indigo);
  border: 2px solid var(--color-indigo);
}

.btn-secondary:hover {
  background: var(--color-soft-bg);
}

/* Section Spacing */
.section {
  padding: var(--spacing-xl) 0;
}

/* Grid Utilities - Mobile First */
.grid {
  display: grid;
  gap: var(--spacing-md);
  grid-template-columns: 1fr; /* Default: Single column */
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 992px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
    gap: 2rem !important; /* Force appropriate gap on mobile */
  }
  .section-title {
    font-size: 2rem;
  }
  .container {
    padding: 0 var(--spacing-sm);
  }
}

/* Navbar - Professional Blue Theme */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--color-deep-blue);
  backdrop-filter: blur(15px);
  z-index: 1000;
  border-bottom: 2px solid rgba(0, 242, 254, 0.2);
  transition: var(--transition-smooth);
}

.navbar.scrolled {
  background: rgba(30, 58, 138, 0.95);
  padding: 10px 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-primary);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--color-white);
}

.logo img {
  height: 40px;
}

.nav-links {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
}

@media (max-width: 1024px) {
  .nav-links {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: var(--color-deep-blue);
    flex-direction: column;
    justify-content: flex-start;
    padding-top: var(--spacing-xl);
    transition: 0.5s ease-in-out;
    z-index: 999;
  }

  .nav-links.active {
    left: 0;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    font-size: 1.25rem;
    display: block;
    padding: 1rem;
  }
}

.nav-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--color-white);
  cursor: pointer;
  z-index: 1001;
  background: none;
  border: none;
  padding: 0.5rem;
}

@media (max-width: 1024px) {
  .nav-toggle {
    display: block;
  }
}

.nav-links a {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--color-white);
  letter-spacing: 0.5px;
  position: relative;
  padding: 0.5rem 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-cyan);
  transition: var(--transition-smooth);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover {
  color: var(--color-cyan);
}

/* Footer */
footer {
  background: var(--color-dark-bg);
  color: var(--color-white);
  padding: 2.5rem 0 1.5rem; /* Compact padding */
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 1.5rem; /* Compact gap */
  margin-bottom: 1.5rem; /* Compact margin */
}

.footer-col h3 {
  font-size: 0.9rem; /* Compact font size */
  margin-bottom: 0.75rem; /* Compact margin */
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-links li {
  margin-bottom: 0.35rem; /* Compact nesting */
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.85rem; /* Compact link text */
  transition: var(--transition-smooth);
}

.footer-links a:hover {
  color: var(--color-cyan);
  padding-left: 5px;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem; /* Compact text */
  color: #94a3b8;
  margin-bottom: 0.35rem; /* Compact margin */
}

.footer-social-links {
  display: flex;
  justify-content: center;
  gap: 0.85rem; /* Compact gap */
  margin-top: 1rem; /* Compact margin */
}

.footer-social-links a {
  width: 32px; /* Compact icon size */
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.9rem; /* Compact icon font size */
  transition: var(--transition-smooth);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-social-links a:hover {
  transform: translateY(-5px) rotate(8deg);
  background: var(--gradient-primary);
  color: var(--color-white);
  border-color: transparent;
  box-shadow: 0 10px 20px rgba(0, 242, 254, 0.3);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem; /* Compact padding */
  text-align: center;
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Card Utilities */
.card {
  background: var(--color-white);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  transition: var(--transition-smooth);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Resource Page Styles */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.resource-card {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  transition: var(--transition-smooth);
}

.resource-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.resource-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Responsive Footer */
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem; /* Compact vertical gap on mobile */
  }

  .footer-col {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .footer-links ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem !important; /* Force vertical stacking on mobile */
  }

  .footer-contact-item {
    justify-content: center;
  }
}

/* Contact Form Status & States */
#result.success {
  color: #10b981; /* Green */
  background: rgba(16, 185, 129, 0.1);
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
}

#result.error {
  color: #ef4444; /* Red */
  background: rgba(239, 68, 68, 0.1);
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
}

button:disabled,
button[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}
