/* 
  Global Variables & Reset 
*/
:root {
  --primary-color: #2563eb; /* Strong tech blue */
  --primary-hover: #1d4ed8;
  --accent-color: #0f172a; /* Dark navy for text/headings */
  --text-color: #334155; /* Slate gray for body text */
  --bg-color: #f8fafc; /* Very light slate/gray */
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
  --font-main: 'Poppins', sans-serif;
  --max-width: 1100px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

:target {
  scroll-margin-top: 90px;
}


body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

ul {
  list-style: none;
}

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

/* 
  Layout Utilities 
*/
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(37, 99, 235, 0.3);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: white;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
}

section {
  padding: 80px 0;
}

h1, h2, h3 {
  color: var(--accent-color);
  line-height: 1.2;
}

h2 {
  font-size: 2rem;
  margin-bottom: 40px;
  text-align: center;
  position: relative;
}

h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background-color: var(--primary-color);
  margin: 15px auto 0;
  border-radius: 2px;
}

/* 
  Header & Navigation 
*/
header {
  background-color: var(--card-bg);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 15px 0;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: -0.5px;
}

nav ul {
  display: flex;
  gap: 30px;
}

nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--accent-color);
}

nav a:hover {
  color: var(--primary-color);
}

/* Mobile Nav Toggle (Hidden on Desktop) */
.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* 
  Hero Section 
*/
.hero {
  background-color: var(--card-bg);
  padding: 100px 0;
  border-bottom: 1px solid var(--border-color);
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 20px;
  background: linear-gradient(to right, var(--accent-color), var(--primary-color));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  font-size: 1.2rem;
  color: var(--text-color);
  margin-bottom: 30px;
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: 15px;
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image img {
  max-width: 100%;
  border-radius: 12px;
  /* box-shadow: var(--shadow-md); */ /* Optional: if image needs shadow */
}

/* 
  Curriculum Section 
*/
.grid-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.card {
  background-color: var(--card-bg);
  border-radius: 12px;
  padding: 30px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

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

.card-icon {
  font-size: 2rem;
  margin-bottom: 20px;
  background-color: #eff6ff;
  color: var(--primary-color);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.card-link:hover {
  color: inherit;
}


.card h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.card p {
  font-size: 0.95rem;
  color: var(--text-color);
  margin-bottom: 20px;
  flex-grow: 1;
}

/* 
  Freebies Section 
*/
#freebies {
  background-color: #fff; /* Distinct background for this section */
}

/* 
  About Section 
*/
.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
}

/* 
  Contact Section 
*/
#contact {
  background-color: #fff;
}

.contact-wrapper {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contact-wrapper p {
  margin-bottom: 30px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--accent-color);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* 
  Footer 
*/
footer {
  background-color: var(--accent-color);
  color: #94a3b8;
  padding: 40px 0;
  text-align: center;
}

footer .container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

footer p {
  font-size: 0.9rem;
}

footer ul {
  display: flex;
  gap: 20px;
}

footer a {
  color: #cbd5e1;
}

footer a:hover {
  color: white;
}

/* 
  Responsive Design 
*/
@media (max-width: 900px) {
  .grid-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .hero-buttons {
    justify-content: center;
  }

  .hero-image {
    order: -1; /* Show image first on mobile? Or keep it below? Let's keep below standard behavior or adjust */
  }
  
  @media (max-width: 768px) {
    nav ul {
      flex-direction: column;
      gap: 15px;
      padding-top: 10px;
    }
  }
  
  header .container {
    flex-direction: column;
  }

  nav ul {
    flex-direction: column;
    gap: 15px;
    align-items: center;
    margin-top: 15px;
  }
}

@media (max-width: 600px) {
  .grid-cards {
    grid-template-columns: 1fr;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    text-align: center;
  }
}

.form-status {
  margin-top: 10px;
  font-size: 0.95rem;
  min-height: 1.2em;          /* reserves space so layout doesn't jump */
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.form-status.success {
  color: #16a34a; /* green-600 */
}

.form-status.error {
  color: #dc2626; /* red-600 */
}

/* Visible state (fade + slide in) */
.form-status.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Quick attention-grabbing pulse */
.form-status.pulse {
  animation: statusPulse 0.6s ease;
}

@keyframes statusPulse {
  0% {
    transform: translateY(0) scale(0.98);
  }
  40% {
    transform: translateY(-1px) scale(1.02);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}
