/* ============================================
   home.css — Homepage + WhatsApp + Chatbot
   Navy Blue · White · Gold
   ============================================ */

/* ════════════════════════════════════════
   HERO SECTION
   ════════════════════════════════════════ */
.hero-section {
  min-height: 100vh;
  background: var(--navy-deep);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-h);
}

/* Subtle radial glow behind content */
.hero-section::before {
  content: '';
  position: absolute;
  top: -20%; left: -10%;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,151,58,0.06) 0%, transparent 65%);
  pointer-events: none;
}

.hero-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

/* ── Left: Text ── */
.hero-content {
  z-index: 1;
}

/* Badge pill */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(200,151,58,0.12);
  border: 1px solid rgba(200,151,58,0.3);
  color: var(--gold-light);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: 100px;
  margin-bottom: 28px;
  animation: fadeUp 0.6s ease 0.05s both;
}
.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse-dot 2s ease infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

/* Heading — matches lovable.app style */
.hero-h1 {
  font-family: var(--ff-heading);
  font-size: clamp(2.4rem, 4.2vw, 3.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 20px;
  animation: fadeUp 0.65s ease 0.12s both;
}
.hero-h1 em {
  font-style: italic;
  color: var(--gold-light);
  display: block;
}

.hero-desc {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.62);
  line-height: 1.78;
  max-width: 480px;
  margin-bottom: 36px;
  animation: fadeUp 0.65s ease 0.20s both;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 52px;
  animation: fadeUp 0.65s ease 0.28s both;
}

/* Stats row — matches lovable.app */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 28px;
  animation: fadeUp 0.65s ease 0.36s both;
}
.hstat {
  display: flex;
  flex-direction: column;
}
.hstat-val {
  font-family: var(--ff-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  letter-spacing: 0.02em;
}
.hstat-lbl {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-top: 5px;
}
.hstat-sep {
  width: 1px;
  height: 40px;
  background: rgba(200,151,58,0.25);
}

/* ── Right: Image ── */
.hero-image-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(200,151,58,0.2);
  box-shadow:
    0 24px 64px rgba(0,0,0,0.5),
    0 0 0 1px rgba(200,151,58,0.1);
  animation: fadeUp 0.8s ease 0.15s both;
}

.hero-img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s ease;
}
.hero-image-wrap:hover .hero-img {
  transform: scale(1.02);
}

/* Gold corner accents */
.img-corner {
  position: absolute;
  width: 28px; height: 28px;
  pointer-events: none;
}
.img-corner--tl { top: 10px; left: 10px; border-top: 2px solid var(--gold); border-left: 2px solid var(--gold); }
.img-corner--br { bottom: 10px; right: 10px; border-bottom: 2px solid var(--gold); border-right: 2px solid var(--gold); }

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


/* ════════════════════════════════════════
   SUBJECTS SECTION — lovable.app style
   ════════════════════════════════════════ */
.subjects-section {
  background: var(--off-white);
}

.section-top {
  text-align: center;
  margin-bottom: 52px;
}
.section-eyebrow {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 12px;
}
.section-title.dark { color: var(--navy); }
.gold-txt { color: var(--gold-dark); }
.gold-bar {
  display: block;
  width: 64px; height: 3px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
  margin: 14px auto 0;
  border-radius: 2px;
}
.section-desc.dark { color: var(--text-muted); margin-top: 18px; }

/* Subject card row — 4 across, matches lovable layout */
.subject-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 56px;
}

.subj-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.subj-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
  transform: scaleX(0);
  transition: transform var(--transition);
  transform-origin: left;
}
.subj-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(200,151,58,0.15);
  border-color: rgba(200,151,58,0.35);
}
.subj-card:hover::after { transform: scaleX(1); }

.subj-card-icon {
  width: 46px; height: 46px;
  border-radius: var(--radius-sm);
  background: var(--navy);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.subj-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

/* Thumbnail image inside each card */
.subj-card-img-wrap {
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 16/9;
  margin-bottom: 4px;
}
.subj-card-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.subj-card:hover .subj-card-img-wrap img { transform: scale(1.06); }

.subj-card-body h3 {
  font-family: var(--ff-heading);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
}
.subj-level-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-dark);
}
.subj-explore {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.05em;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--transition), transform var(--transition);
}
.subj-card:hover .subj-explore { opacity: 1; transform: translateX(0); }


/* ── Feature Pillars 01/02/03 ── */
.feature-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.pillar {
  padding: 32px 28px;
  border-left: 3px solid var(--gold);
  background: var(--white);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-shadow: var(--shadow-md);
}
.pillar-num {
  font-family: var(--ff-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--border-light);
  line-height: 1;
  margin-bottom: 12px;
}
.pillar-title {
  font-family: var(--ff-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}
.pillar p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
}


/* ════════════════════════════════════════
   CTA BAND — matches lovable.app green strip
   ════════════════════════════════════════ */
.cta-band {
  background: var(--navy);
  border-top: 1px solid rgba(200,151,58,0.2);
  border-bottom: 1px solid rgba(200,151,58,0.2);
  padding: 56px 0;
}
.cta-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band-text h2 {
  font-family: var(--ff-heading);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.cta-band-text p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
}


/* ════════════════════════════════════════
   WHATSAPP FLOATING BUTTON
   ════════════════════════════════════════ */
.wa-float {
  position: fixed;
  bottom: 96px;
  right: 24px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: #fff;
  border-radius: 100px;
  padding: 10px 18px 10px 10px;
  box-shadow: 0 6px 24px rgba(37,211,102,0.45);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: transform var(--transition), box-shadow var(--transition), padding var(--transition);
  overflow: visible;
}
.wa-float:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 10px 32px rgba(37,211,102,0.55);
}

.wa-icon {
  width: 36px; height: 36px;
  flex-shrink: 0;
}

.wa-label {
  white-space: nowrap;
  font-family: var(--ff-body);
}

/* Pulsing ring */
.wa-pulse {
  position: absolute;
  top: 50%; left: 10px;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(37,211,102,0.35);
  animation: wa-ring 2s ease-out infinite;
  pointer-events: none;
}
@keyframes wa-ring {
  0%   { transform: translateY(-50%) scale(1); opacity: 0.8; }
  100% { transform: translateY(-50%) scale(2.2); opacity: 0; }
}

/* Collapsed on very small screens */
@media (max-width: 420px) {
  .wa-label { display: none; }
  .wa-float { padding: 10px; border-radius: 50%; }
}


/* ════════════════════════════════════════
   AI CHATBOT TOGGLE BUTTON
   ════════════════════════════════════════ */
.chat-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 901;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  border: 2px solid var(--gold);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(13,27,62,0.45), 0 0 0 0 rgba(200,151,58,0.3);
  transition: transform var(--transition), box-shadow var(--transition);
  animation: chat-btn-pulse 3s ease infinite;
}
.chat-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 32px rgba(13,27,62,0.55), 0 0 0 6px rgba(200,151,58,0.15);
  animation: none;
}
@keyframes chat-btn-pulse {
  0%, 100% { box-shadow: 0 6px 24px rgba(13,27,62,0.45), 0 0 0 0 rgba(200,151,58,0.3); }
  50% { box-shadow: 0 6px 24px rgba(13,27,62,0.45), 0 0 0 10px rgba(200,151,58,0); }
}

.chat-toggle-icon { width: 24px; height: 24px; }

/* Notification badge */
.chat-toggle-badge {
  position: absolute;
  top: -4px; right: -4px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy-deep);
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--white);
  animation: badge-pop 0.4s ease 1.5s both;
}
@keyframes badge-pop {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}


/* ════════════════════════════════════════
   CHATBOT WINDOW
   ════════════════════════════════════════ */
.chat-window {
  position: fixed;
  bottom: 96px;
  right: 24px;
  z-index: 902;
  width: 360px;
  max-height: 560px;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--border-light);
  box-shadow: 0 24px 80px rgba(0,0,0,0.22), 0 0 0 1px rgba(200,151,58,0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;

  /* Hidden by default */
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
  transform-origin: bottom right;
}
.chat-window.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* Header */
.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(135deg, var(--navy-deep), var(--navy-light));
  border-bottom: 2px solid rgba(200,151,58,0.3);
  flex-shrink: 0;
}
.chat-header-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold-light));
  color: var(--navy-deep);
  font-family: var(--ff-display);
  font-size: 0.85rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--gold);
  flex-shrink: 0;
}
.chat-header-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chat-header-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--white);
  font-family: var(--ff-heading);
}
.chat-header-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
}
.online-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4ade80;
  animation: blink-dot 2s ease infinite;
}
@keyframes blink-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.chat-header-close {
  background: rgba(255,255,255,0.1);
  border: none;
  color: rgba(255,255,255,0.7);
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}
.chat-header-close:hover { background: rgba(255,255,255,0.2); color: var(--white); }

/* Messages area */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f4f4f8;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* Message bubbles */
.msg {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  max-width: 88%;
}
.msg.bot { align-self: flex-start; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }

.msg-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold-light));
  color: var(--navy-deep);
  font-size: 0.6rem;
  font-weight: 900;
  font-family: var(--ff-display);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1.5px solid var(--gold);
}

.msg-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.875rem;
  line-height: 1.55;
  word-break: break-word;
}
.msg.bot .msg-bubble {
  background: var(--white);
  color: var(--text-dark);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border-light);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.msg.user .msg-bubble {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: var(--white);
  border-bottom-right-radius: 4px;
}

/* Typing indicator */
.msg-typing .msg-bubble {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 12px 16px;
}
.typing-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typing-bounce 1.2s ease infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-6px); opacity: 1; }
}

/* Quick replies */
.chat-quick-replies {
  padding: 8px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--white);
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
}
.qr-btn {
  background: var(--off-white);
  border: 1px solid var(--border-light);
  border-radius: 100px;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  font-family: var(--ff-body);
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  white-space: nowrap;
}
.qr-btn:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--gold-light);
}

/* Input row */
.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: var(--white);
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
}
.chat-input {
  flex: 1;
  background: var(--off-white);
  border: 1.5px solid var(--border-light);
  border-radius: 100px;
  padding: 9px 16px;
  font-family: var(--ff-body);
  font-size: 0.88rem;
  color: var(--text-dark);
  outline: none;
  transition: border-color var(--transition);
}
.chat-input:focus { border-color: var(--gold); }
.chat-input::placeholder { color: #b5b0a8; }

.chat-send {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  border: none;
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform var(--transition), box-shadow var(--transition);
}
.chat-send:hover { transform: scale(1.08); box-shadow: 0 4px 12px rgba(13,27,62,0.35); }

.chat-footer-note {
  text-align: center;
  font-size: 0.68rem;
  color: var(--text-muted);
  padding: 6px 12px 8px;
  background: var(--white);
  flex-shrink: 0;
}
.chat-footer-note a { color: var(--gold-dark); }


/* ════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════ */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 64px 28px;
  }
  .hero-image-wrap { max-width: 600px; margin: 0 auto; }
  .subject-row { grid-template-columns: repeat(2, 1fr); }
  .feature-pillars { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .hero-h1 { font-size: 2.2rem; }
  .hero-actions { flex-direction: column; max-width: 260px; }
  .subject-row { grid-template-columns: repeat(2, 1fr); }
  .feature-pillars { grid-template-columns: 1fr; }
  .cta-band-inner { flex-direction: column; text-align: center; }
  .chat-window { width: calc(100vw - 32px); right: 16px; bottom: 88px; }
  .wa-float { bottom: 152px; right: 16px; }
  .chat-toggle { right: 16px; bottom: 16px; }
}

@media (max-width: 480px) {
  .subject-row { grid-template-columns: 1fr; }
  .hero-stats { gap: 16px; }
  .hstat-val { font-size: 1.6rem; }
}
