/* ============================================================
   Future Coders Academy – Piler | Custom Styles
   ============================================================ */

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

/* ── CSS Variables ── */
:root {
  --primary:       #1d4ed8;
  --primary-dark:  #1e3a8a;
  --primary-mid:   #1e40af;
  --primary-light: #3b82f6;
  --secondary:     #f97316;
  --secondary-dk:  #ea580c;
  --secondary-lt:  #fb923c;
  --white:         #ffffff;
  --bg-light:      #f0f6ff;
  --text-dark:     #1e293b;
  --text-gray:     #64748b;
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Poppins', sans-serif; color: var(--text-dark); overflow-x: hidden; background: #ffffff; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-14px); }
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%       { transform: translateY(-8px) rotate(3deg); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes pulseRing {
  0%   { transform: scale(1);   opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes bounceIn {
  0%  { transform: scale(0);   opacity: 0; }
  60% { transform: scale(1.1); }
  100%{ transform: scale(1);   opacity: 1; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   FLOATING CODE ELEMENTS (hero background)
   ============================================================ */

.floating-code {
  position: absolute;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: rgba(255,255,255,0.18);
  animation: float 7s ease-in-out infinite;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}
.floating-code:nth-child(1)  { top: 8%;  left: 4%;   animation-delay: 0s;   font-size: 15px; }
.floating-code:nth-child(2)  { top: 18%; right: 6%;  animation-delay: 1.2s; font-size: 11px; }
.floating-code:nth-child(3)  { top: 55%; left: 2%;   animation-delay: 2.3s; font-size: 17px; }
.floating-code:nth-child(4)  { top: 72%; right: 4%;  animation-delay: 0.7s; font-size: 13px; }
.floating-code:nth-child(5)  { top: 38%; left: 7%;   animation-delay: 1.8s; font-size: 11px; }
.floating-code:nth-child(6)  { top: 88%; left: 18%;  animation-delay: 3.1s; font-size: 14px; }
.floating-code:nth-child(7)  { top: 28%; right: 2%;  animation-delay: 2.8s; font-size: 12px; }
.floating-code:nth-child(8)  { top: 48%; right: 10%; animation-delay: 0.4s; font-size: 16px; }

/* ============================================================
   HERO SECTION
   ============================================================ */

.hero-section {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 45%, #2563eb 75%, #1e40af 100%);
  background-size: 200% 200%;
  animation: gradientShift 10s ease infinite;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(249,115,22,0.22) 0%, transparent 68%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -25%;
  left: -8%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(59,130,246,0.25) 0%, transparent 68%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50px;
  padding: 7px 18px;
  color: white;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 22px;
}

.hero-badge .badge-tag {
  background: var(--secondary);
  color: white;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

/* ── Robot illustration ── */
.robot-wrapper {
  animation: float 4.5s ease-in-out infinite;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.3));
}

/* ============================================================
   STATS BAR
   ============================================================ */

.stats-bar {
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 50px rgba(0,0,0,0.12);
  position: relative;
  z-index: 10;
  margin-top: -50px;
}

.stat-item { text-align: center; padding: 26px 20px; position: relative; }
.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 22%;
  height: 56%;
  width: 1px;
  background: #e2e8f0;
}

.stat-number {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  display: block;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-gray);
  margin-top: 5px;
  font-weight: 500;
}

/* ============================================================
   SECTION UTILITIES
   ============================================================ */

.section-badge {
  display: inline-block;
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
  color: var(--primary);
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  border: 1px solid #bfdbfe;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-gray);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ============================================================
   CARD STYLES
   ============================================================ */

.card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}
.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.card-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 16px;
}

/* ── Course cards ── */
.course-card {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: white;
}
.course-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.18);
}

.course-card-header {
  padding: 28px 28px 20px;
  position: relative;
  overflow: hidden;
}
.course-card-header::before {
  content: '';
  position: absolute;
  top: -25px;
  right: -25px;
  width: 120px;
  height: 120px;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
}
.course-card-header::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: -15px;
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}

/* ── Project cards ── */
.project-card {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: white;
}
.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.18);
}

.project-preview {
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn-primary {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dk));
  color: white;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  box-shadow: 0 4px 18px rgba(249,115,22,0.4);
  text-decoration: none;
  position: relative;
  z-index: 1;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(249,115,22,0.5); }

.btn-secondary {
  background: transparent;
  color: white;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 16px;
  border: 2px solid rgba(255,255,255,0.6);
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}
.btn-secondary:hover { background: rgba(255,255,255,0.15); border-color: white; transform: translateY(-3px); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 15px;
  border: 2px solid var(--primary);
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}
.btn-outline:hover { background: var(--primary); color: white; transform: translateY(-3px); }

.btn-green {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  box-shadow: 0 4px 18px rgba(34,197,94,0.4);
  text-decoration: none;
}
.btn-green:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(34,197,94,0.5); }

/* ── Pulse animation for CTA buttons ── */
.btn-pulse::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50px;
  background: var(--secondary);
  animation: pulseRing 2.2s ease-out infinite;
  z-index: -1;
}

/* ============================================================
   NAVIGATION
   ============================================================ */

.nav-link {
  position: relative;
  color: #374151;
  text-decoration: none;
  font-weight: 500;
  padding: 4px 0;
  transition: color 0.2s;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}
.nav-link:hover, .nav-link.active { color: var(--primary); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.nav-scrolled { box-shadow: 0 4px 24px rgba(0,0,0,0.1) !important; }

/* ============================================================
   WHATSAPP FLOATING BUTTON
   ============================================================ */

.whatsapp-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 58px;
  height: 58px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: white;
  box-shadow: 0 6px 24px rgba(37,211,102,0.5);
  z-index: 999;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  animation: bounceIn 0.6s ease;
}
.whatsapp-btn:hover { transform: scale(1.12) translateY(-3px); box-shadow: 0 10px 34px rgba(37,211,102,0.6); }
.whatsapp-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25d366;
  animation: pulseRing 2.2s ease-out infinite;
  opacity: 0.55;
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */

.testimonial-card {
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.testimonial-card:hover { transform: translateY(-6px); box-shadow: 0 18px 45px rgba(0,0,0,0.13); }
.testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: 8px;
  left: 18px;
  font-size: 90px;
  color: var(--primary);
  opacity: 0.08;
  font-family: Georgia, serif;
  line-height: 1;
  pointer-events: none;
}

.avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: white;
  flex-shrink: 0;
}

/* ============================================================
   FORM STYLES
   ============================================================ */

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 13px 18px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  transition: border-color 0.25s, box-shadow 0.25s;
  background: white;
  color: #1e293b;
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(29,78,216,0.1);
}
.form-input:hover, .form-select:hover, .form-textarea:hover { border-color: #93c5fd; }

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}

.form-textarea { resize: vertical; min-height: 120px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

/* ── Success message ── */
.success-message {
  display: none;
  background: linear-gradient(135deg, #d1fae5, #ecfdf5);
  border: 1px solid #6ee7b7;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  color: #065f46;
}
.success-message.show { display: block; animation: fadeInUp 0.5s ease; }

/* ============================================================
   ANIMATE ON SCROLL
   ============================================================ */

.animate-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.animate-on-scroll.animated { opacity: 1; transform: translateY(0); }

.animate-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.animate-left.animated { opacity: 1; transform: translateX(0); }

.animate-right {
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.animate-right.animated { opacity: 1; transform: translateX(0); }

/* ── Stagger delays ── */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }

/* ============================================================
   PAGE HERO (inner pages)
   ============================================================ */

.page-hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 55%, #2563eb 100%);
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -45%;
  right: -10%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(249,115,22,0.22) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -5%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.07) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* ============================================================
   SKILL & PROJECT BADGES
   ============================================================ */

.skill-badge {
  display: inline-block;
  background: #dbeafe;
  color: #1d4ed8;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #93c5fd;
}

.project-tag {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid #fde68a;
}

/* ============================================================
   BENEFIT ITEMS
   ============================================================ */

.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  background: white;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.benefit-item:hover { transform: translateX(8px); box-shadow: 0 8px 28px rgba(0,0,0,0.1); }

/* ============================================================
   STEPS
   ============================================================ */

.step-number {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: white;
  margin: 0 auto 18px;
  box-shadow: 0 6px 18px rgba(29,78,216,0.35);
  flex-shrink: 0;
}

/* ============================================================
   CONTACT
   ============================================================ */

.contact-info-card {
  background: white;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}
.contact-info-card:hover { transform: translateY(-6px); box-shadow: 0 18px 45px rgba(0,0,0,0.12); }

.contact-icon {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 16px;
}

.map-container { border-radius: 20px; overflow: hidden; box-shadow: 0 10px 45px rgba(0,0,0,0.15); }

/* ============================================================
   FAQ ACCORDION
   ============================================================ */

.faq-item {
  background: white;
  border-radius: 14px;
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.faq-question {
  padding: 18px 24px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #1e293b;
  transition: background 0.2s;
  user-select: none;
}
.faq-question:hover { background: #f8fafc; }
.faq-icon { transition: transform 0.3s ease; }
.faq-item.open .faq-icon { transform: rotate(180deg); }
.faq-answer {
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.35s ease;
  color: var(--text-gray);
  font-size: 14px;
  line-height: 1.7;
}
.faq-answer.open { padding: 0 24px 18px; max-height: 300px; }

/* ============================================================
   LOADING SCREEN
   ============================================================ */

.loading-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}
.loading-overlay.hidden { opacity: 0; pointer-events: none; }
.loader {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255,255,255,0.2);
  border-top-color: var(--secondary);
  border-radius: 50%;
  animation: spinSlow 0.85s linear infinite;
}

/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  z-index: 9999;
  width: 0%;
  transition: width 0.1s ease;
}

/* ============================================================
   BACK TO TOP
   ============================================================ */

#backToTop {
  position: fixed;
  bottom: 100px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(29,78,216,0.4);
  transition: all 0.3s ease;
  opacity: 0;
  pointer-events: none;
  z-index: 998;
}
#backToTop.opacity-100 { opacity: 1; pointer-events: all; }
#backToTop:hover { transform: translateY(-3px); background: var(--primary-mid); }

/* ============================================================
   CODE EDITOR MOCKUP
   ============================================================ */

.code-window {
  background: #0f172a;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.code-window-header {
  background: #1e293b;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.code-dot { width: 12px; height: 12px; border-radius: 50%; }
.code-body { padding: 20px; font-family: 'Courier New', monospace; font-size: 13px; line-height: 1.8; }
.code-line-num { color: #475569; margin-right: 16px; user-select: none; }
.c-keyword { color: #7dd3fc; }
.c-func    { color: #fde68a; }
.c-string  { color: #86efac; }
.c-comment { color: #64748b; }
.c-orange  { color: #fb923c; }
.c-purple  { color: #c4b5fd; }

/* ── Cursor blink ── */
.cursor-blink {
  display: inline-block;
  width: 2px;
  height: 15px;
  background: #7dd3fc;
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}

/* ============================================================
   MOBILE NAV MENU ANIMATION
   ============================================================ */

#mobileMenu { animation: slideDown 0.25s ease; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .section-title      { font-size: 1.8rem; }
  .stat-number        { font-size: 2rem; }
  .hero-section       { padding-top: 100px; padding-bottom: 60px; }
  .whatsapp-btn, #backToTop { bottom: 20px; right: 20px; }
  .whatsapp-btn       { width: 50px; height: 50px; font-size: 22px; }
}

@media (max-width: 480px) {
  .section-title { font-size: 1.55rem; }
  .btn-primary, .btn-secondary { padding: 12px 22px; font-size: 14px; }
}
