/* --- General Setup & Variables --- */
:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --dark-color: #0f172a;
  --slate-color: #475569;
  --light-slate: #64748b;
  --border-color: #e2e8f0;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
}

body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  background: var(--bg-light);
  color: var(--dark-color);
  margin: 0;
  line-height: 1.7;
  overflow-x: hidden; /* Prevent horizontal scroll from animations */
}

/* --- Typography --- */
h1, h2, h3 { line-height: 1.3; }
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; margin-bottom: 1.5rem; }
.section-title { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 700; text-align: center; margin-bottom: 3rem; }
.section-subtitle { font-size: 1.5rem; font-weight: 600; text-align: center; margin-bottom: 1rem; margin-top: 3rem; color: var(--dark-color); }
h3 { font-size: 1.375rem; font-weight: 600; margin-bottom: 1rem; }
p { color: var(--slate-color); }
a { text-decoration: none; }
ul { list-style: disc; padding-left: 1.5rem; }
ul li { margin-bottom: 0.5rem; }

/* --- Layout --- */
main { max-width: 1280px; margin: 0 auto; padding: 4rem 1.5rem; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.round-corners { border-radius: 0.75rem; }


/* --- Header & Navigation --- */
header {
  position: sticky; top: 0; width: 100%;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.header-container {
  max-width: 1280px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon {
  width: 50px; height: 50px; background: var(--primary-color); color: white;
  border-radius: 8px; display: grid; place-items: center;
  font-size: 24px; font-weight: bold;
}
.logo-text { font-size: 1.5rem; font-weight: 700; margin: 0; line-height: 1; }
.logo-text .focus { color: var(--primary-color); }
.logo-text .nextgen { color: var(--dark-color); }
.logo-tagline { font-size: 1rem; color: var(--light-slate); margin: 0; }
nav { display: flex; }
.nav-tabs { display: flex; gap: 2rem; }
.nav-link {
  color: var(--slate-color); cursor: pointer; padding: 0.5rem 0;
  position: relative; transition: color 0.2s; font-weight: 500;
}
.nav-link:hover, .nav-link.active { color: var(--primary-color); }
.nav-link.active::after {
  content: ''; position: absolute; bottom: -1.7rem; left: 0;
  width: 100%; height: 3px; background: var(--primary-color);
}
.mobile-menu-toggle { display: none; }

/* --- Hero Section --- */
.hero {
  text-align: center; padding: clamp(4rem, 10vh, 8rem) 1rem;
  background: linear-gradient(to bottom, #eff6ff, var(--bg-light));
  border-radius: 1rem; margin-bottom: 4rem;
}
.cta-button {
  background: var(--primary-color); color: white;
  padding: 1rem 2.5rem; border-radius: 0.5rem;
  font-size: 1rem; font-weight: 600; cursor: pointer;
  transition: background 0.2s, transform 0.2s; display: inline-block; margin-top: 1.5rem;
}
.cta-button:hover { background: var(--primary-hover); transform: translateY(-3px); }

/* --- General Components & Grids --- */
.highlights, .services-grid, .job-grid { display: grid; gap: 2rem; }
.highlights { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.services-grid, .job-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.highlight-card, .service-card, .job-card {
  background: var(--bg-white); border: 1px solid var(--border-color);
  border-radius: 0.75rem; padding: 2rem; text-align: center;
  box-shadow: var(--shadow); transition: transform 0.3s, box-shadow 0.3s;
}
.highlight-card:hover, .service-card:hover, .job-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.highlight-icon, .service-icon { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 1rem; }
.service-card { text-align: left; }

/* --- Image Banners --- */
.image-banner {
    display: flex; flex-direction: column; align-items: center;
    background: var(--bg-white); border: 1px solid var(--border-color);
    border-radius: 1rem; overflow: hidden;
    margin: 5rem auto; box-shadow: var(--shadow);
}
.image-banner img {
    width: 100%; height: 300px; object-fit: cover;
    display: block;
}
.banner-content {
    padding: 3rem 2rem; text-align: center;
}
.banner-content h3 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 1rem; color: var(--dark-color); }
.banner-content p { font-size: 1.125rem; margin-bottom: 1.5rem; }

@media (min-width: 992px) {
    .image-banner { flex-direction: row; text-align: left; }
    .image-banner img { width: 50%; height: auto; min-height: 400px; }
    .image-banner .banner-content { width: 50%; text-align: left; padding: 4rem; }
    .image-banner.reverse-layout { flex-direction: row-reverse; }
}


/* --- Section Specific Styling --- */
.about-section, .mission-section, .careers-section, .projects-section {
    max-width: 56.25rem; margin: 0 auto 5rem;
}
.content-with-image {
    display: flex; flex-direction: column; align-items: center; gap: 2rem;
    margin-bottom: 3rem; text-align: center;
}
.content-with-image img {
    width: 100%; max-width: 400px; height: auto; object-fit: cover;
}
@media (min-width: 768px) {
    .content-with-image { flex-direction: row; text-align: left; }
    .content-with-image img { width: 40%; max-width: none; }
    .content-with-image > div { width: 60%; }
}

.founder-bio {
  display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
  text-align: center; background: var(--bg-white); border-radius: 0.75rem;
  padding: 2rem; margin: 3rem auto; border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}
.founder-photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 4px solid var(--primary-color); }
@media (min-width: 768px) {
  .founder-bio { flex-direction: row; text-align: left; gap: 2rem; }
}

/* --- Projects & Flashcards --- */
.strong-statement { font-size: 1.5rem; font-weight: 600; margin: 1rem auto 3rem; text-align: center; color: var(--dark-color); }
.flashcard-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; margin-bottom: 3rem; }
.flashcard {
  background: var(--bg-white); border: 1px solid var(--border-color);
  border-radius: 0.75rem; padding: 1.5rem; text-align: center;
  box-shadow: var(--shadow); transition: transform 0.3s, background-color 0.3s; cursor: pointer;
  perspective: 1000px; /* For 3D flip effect */
}
.flashcard:hover { transform: translateY(-5px); background-color: var(--bg-light); } /* Soft hover lift and background change */

/* Flashcard content styling for initially hidden content */
.flashcard-title { font-size: 1.25rem; font-weight: 700; color: var(--dark-color); margin-bottom: 1rem; }
.flashcard-content { display: block; opacity: 0; transform: translateY(10px); transition: opacity 0.3s ease, transform 0.3s ease; } /* Hidden by default */
.flashcard:hover .flashcard-content { opacity: 1; transform: translateY(0); } /* Reveals on hover */

/* Specific styling for testimonial flashcard */
.testimonial-card { background: var(--dark-color); color: var(--bg-light); }
.testimonial-card .flashcard-title { color: var(--bg-white); }
.testimonial-card p { color: var(--light-slate); }
.testimonial-card:hover { background: var(--dark-color); transform: translateY(-5px); } /* Keep dark on hover */

.testimonial-photo { width: 80px; height: 80px; border-radius: 50%; margin-bottom: 1rem; object-fit: cover; border: 3px solid var(--primary-color); }
.flash-highlight { margin-top: 1rem; }
.flash-icon { font-size: 2rem; color: var(--primary-color); margin-bottom: 0.5rem; }
.projects-image { width: 100%; border-radius: 0.75rem; margin-top: 2rem; max-height: 500px; object-fit: cover; }

/* --- Careers --- */
.job-card .job-title { margin-bottom: 0.5rem; }
.job-card .job-detail { color: var(--slate-color); margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; justify-content: center; }
.apply-button {
  background: var(--primary-color); color: white; padding: 0.75rem 1.5rem;
  border-radius: 0.5rem; font-weight: 500; transition: background 0.2s;
  display: inline-block; margin-top: 1rem; cursor: pointer;
}
.apply-button:hover { background: var(--primary-hover); }

/* --- Contact --- */
.contact-section { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: start; }
@media (min-width: 992px) { .contact-section { grid-template-columns: 1fr 1fr; } }
.contact-info p { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; font-size: 1.1rem; }
.contact-info i { color: var(--primary-color); width: 20px; text-align: center; }
.map-container { margin-top: 1.5rem; border-radius: 0.75rem; height: 250px; overflow: hidden; }
form { display: grid; gap: 1.25rem; }
label { font-weight: 500; }
input, select, textarea {
  margin-top: 0.375rem; padding: 0.85rem; width: 100%; box-sizing: border-box;
  border: 1px solid var(--border-color); border-radius: 0.5rem; font-size: 0.9375rem;
  background: white; transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}
textarea { min-height: 7.5rem; }
form button {
  background: var(--primary-color); color: white; padding: 1rem; border-radius: 0.5rem;
  border: none; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background 0.2s;
}
form button:hover { background: var(--primary-hover); }

/* --- Footer --- */
footer {
  background: var(--dark-color); padding: 2.5rem 1.5rem; margin-top: 4rem;
  color: var(--light-slate); text-align: center;
}
.footer-container p { color: var(--light-slate); }
.footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-top: 1rem; }
.footer-link { color: var(--light-slate); transition: color 0.2s; }
.footer-link:hover { color: var(--primary-color); }

/* --- Animations --- */
.animate-fade-in { opacity: 0; animation: fadeIn 1s ease-out forwards; }
.delay-1 { animation-delay: 0.3s; }
.delay-2 { animation-delay: 0.6s; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-pop-in { opacity: 0; transform: scale(0.9); animation: popIn 0.6s ease-out forwards; }
@keyframes popIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}


.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.reveal.visible { opacity: 1; transform: translateY(0); }


/* --- Responsive Design --- */
@media (max-width: 992px) {
  .header-container { flex-wrap: wrap; }
  .nav-tabs { display: none; order: 3; width: 100%; flex-direction: column; text-align: center; margin-top: 1rem; gap: 0; }
  .nav-tabs.active { display: flex; }
  .nav-link { padding: 1rem; }
  .nav-link.active::after { display: none; }
  .mobile-menu-toggle {
    display: block; font-size: 1.5rem;
    background: none; border: none; color: var(--dark-color);
    cursor: pointer;
  }
}
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  .logo-text-container { display: none; } /* Hide tagline on very small screens for space */
  .highlight-card, .service-card, .job-card, .flashcard { padding: 1.5rem; }
  .job-card .job-detail { justify-content: flex-start; } /* Left align job details on small screens */
}/* --- Stacked Image Flashcards for Projects Page --- */
.stacked-image-cards-container {
    display: flex;
    flex-direction: column; /* This stacks the items vertically */
    align-items: center; /* This centers the cards horizontally */
    gap: 2rem; /* This creates space between the two cards */
    margin: 3rem auto; /* Adds space above and below the container */
}

.image-flashcard {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 0.75rem; /* A small padding to create a "frame" */
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    width: 100%;
    max-width: 600px; /* Controls the maximum size of the cards */
    overflow: hidden; /* Ensures the image stays within the rounded corners */
}

.image-flashcard:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.image-flashcard img {
    width: 100%;
    display: block;
    border-radius: 0.5rem; /* Slightly smaller radius for the image inside the card */
}