/* =========================================================
   SBS College — Extra Features Styles
   News Slider | Accreditation Slider | Social Feed | AI Chatbot
   ========================================================= */

/* =============================================
   NEWS & EVENTS AUTO SLIDER
   ============================================= */
.news-slider-section {
  background: var(--white);
  padding: var(--space-4xl) 0;
}
.news-slider-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}
.news-slider-track {
  display: flex;
  transition: transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.news-slide {
  min-width: 33.333%;
  padding: 0 0.75rem;
  box-sizing: border-box;
}
.news-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--light-gray);
  overflow: hidden;
  height: 100%;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}
.news-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
  border-color: transparent;
}
.news-card-img {
  height: 200px;
  overflow: hidden;
  position: relative;
  background: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.news-card:hover .news-card-img img { transform: scale(1.07); }
.news-card-date-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--accent);
  color: var(--white);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
}
.news-card-type {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
}
.news-card-type.event { background: rgba(59,130,246,0.15); color: #2563eb; }
.news-card-type.news  { background: rgba(34,197,94,0.15);  color: #16a34a; }
.news-card-type.notice { background: rgba(239,68,68,0.12); color: #dc2626; }
.news-card-body { padding: 1.25rem 1.5rem; flex: 1; display: flex; flex-direction: column; }
.news-card-body h4 {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  line-height: 1.45;
}
.news-card-body p { font-size: 0.82rem; color: var(--dark-gray); line-height: 1.7; flex: 1; }
.news-card-footer {
  padding: 0.85rem 1.5rem;
  border-top: 1px solid var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.news-card-footer .read-more {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap var(--transition-fast);
}
.news-card-footer .read-more:hover { gap: 0.55rem; color: var(--accent-dark); }
.news-card-footer .meta {
  font-size: 0.75rem;
  color: var(--mid-gray);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Slider Controls */
.slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}
.slider-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--light-gray);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}
.slider-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-md);
}
.slider-dots {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}
.slider-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--light-gray);
  cursor: pointer;
  border: none;
  transition: all var(--transition-base);
}
.slider-dot.active {
  background: var(--primary);
  width: 22px;
  border-radius: var(--radius-full);
}

@media (max-width: 900px) {
  .news-slide { min-width: 50%; }
}
@media (max-width: 580px) {
  .news-slide { min-width: 100%; }
}

/* =============================================
   ACCREDITATION SLIDER (Marquee-style Infinite)
   ============================================= */
.accred-slider-section {
  background: var(--off-white);
  padding: var(--space-2xl) 0;
  overflow: hidden;
}
.accred-slider-track-wrap {
  overflow: hidden;
  -webkit-mask: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  mask: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.accred-slider-track {
  display: flex;
  gap: 1.5rem;
  animation: accredScroll 28s linear infinite;
  width: max-content;
}
.accred-slider-track:hover { animation-play-state: paused; }
@keyframes accredScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.accred-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.4rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--light-gray);
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--transition-base);
  min-width: 240px;
}
.accred-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  transform: translateY(-3px);
}
.accred-card-icon {
  font-size: 2.4rem;
  flex-shrink: 0;
}
.accred-card-info .title {
  font-weight: 800;
  color: var(--text-dark);
  font-size: 1rem;
  line-height: 1.2;
}
.accred-card-info .subtitle {
  font-size: 0.75rem;
  color: var(--dark-gray);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.2rem;
}
.accred-card-info .badge {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  background: rgba(26,42,108,0.08);
  color: var(--primary);
}

/* =============================================
   SOCIAL MEDIA FEED BOX
   ============================================= */
.social-feeds-section {
  background: var(--white);
  padding: var(--space-4xl) 0;
}
.social-feeds-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
.social-feed-box {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--light-gray);
  display: flex;
  flex-direction: column;
}
/* Facebook */
.social-feed-box.fb { --sc: #1877f2; --sc-light: rgba(24,119,242,0.08); }
/* Instagram */
.social-feed-box.ig {
  --sc: #e1306c;
  --sc-light: rgba(225,48,108,0.08);
}
/* LinkedIn */
.social-feed-box.li { --sc: #0a66c2; --sc-light: rgba(10,102,194,0.08); }

.social-feed-header {
  background: var(--sc, var(--primary));
  color: #fff;
  padding: 1rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.social-feed-header-left { display: flex; align-items: center; gap: 0.75rem; }
.social-feed-icon {
  width: 42px; height: 42px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.social-feed-name { font-weight: 700; font-size: 0.95rem; }
.social-feed-handle { font-size: 0.72rem; opacity: 0.8; }
.social-feed-follow {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.5);
  color: #fff;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.social-feed-follow:hover { background: rgba(255,255,255,0.35); }

.social-feed-body {
  flex: 1;
  overflow: hidden;
}
.social-post-slider {
  position: relative;
  overflow: hidden;
}
.social-post {
  display: none;
  padding: 1.2rem 1.4rem;
  animation: fadeIn 0.5s ease;
}
.social-post.active { display: block; }
.social-post-text {
  font-size: 0.87rem;
  color: var(--text-body);
  line-height: 1.75;
  margin-bottom: 0.85rem;
}
.social-post-text a { color: var(--sc, var(--primary)); }
.social-post-img {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 0.85rem;
  height: 180px;
  background: var(--sc-light, var(--light-gray));
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
}
.social-post-img img { width: 100%; height: 100%; object-fit: cover; }
.social-post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--mid-gray);
}
.social-post-reactions { display: flex; gap: 0.85rem; }
.social-post-reactions span { display: flex; align-items: center; gap: 0.25rem; cursor: pointer; transition: color var(--transition-fast); }
.social-post-reactions span:hover { color: var(--sc, var(--primary)); }

.social-feed-nav {
  padding: 0.65rem 1.4rem;
  background: var(--sc-light, var(--light-gray));
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--light-gray);
}
.social-nav-dots { display: flex; gap: 0.35rem; }
.social-nav-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(0,0,0,0.15);
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}
.social-nav-dot.active { background: var(--sc, var(--primary)); width: 18px; border-radius: var(--radius-full); }
.social-nav-arrows { display: flex; gap: 0.4rem; }
.social-nav-arrow {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.08);
  border: none;
  color: var(--text-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.social-nav-arrow:hover { background: var(--sc, var(--primary)); color: #fff; }

.social-feed-footer {
  padding: 0.75rem 1.4rem;
  text-align: center;
  border-top: 1px solid var(--light-gray);
}
.social-feed-footer a {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--sc, var(--primary));
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap var(--transition-fast);
}
.social-feed-footer a:hover { gap: 0.55rem; }

@media (max-width: 900px) { .social-feeds-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 580px) { .social-feeds-grid { grid-template-columns: 1fr; } }

/* =============================================
   AI CHATBOT
   ============================================= */
.chatbot-fab {
  position: fixed;
  bottom: 5.5rem;
  right: 2rem;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  box-shadow: 0 6px 24px rgba(26,42,108,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1001;
  border: 3px solid rgba(255,255,255,0.25);
  transition: all var(--transition-base);
  animation: chatPulse 3s ease-in-out infinite;
}
.chatbot-fab:hover {
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 10px 32px rgba(26,42,108,0.5);
  animation: none;
}
@keyframes chatPulse {
  0%,100% { box-shadow: 0 6px 24px rgba(26,42,108,0.4), 0 0 0 0 rgba(26,42,108,0.25); }
  50%      { box-shadow: 0 6px 24px rgba(26,42,108,0.4), 0 0 0 12px rgba(26,42,108,0); }
}
.chatbot-tooltip {
  position: fixed;
  bottom: 8.5rem;
  right: 2rem;
  background: var(--primary-dark);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: all var(--transition-base);
  z-index: 1000;
}
.chatbot-fab:hover + .chatbot-tooltip,
.chatbot-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}
.chatbot-unread {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  background: #ef4444;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

/* Chatbot Window */
.chatbot-window {
  position: fixed;
  bottom: 9rem;
  right: 2rem;
  width: 380px;
  height: 540px;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 70px rgba(26,42,108,0.22), 0 4px 20px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  z-index: 1002;
  overflow: hidden;
  transform: scale(0.85) translateY(30px);
  transform-origin: bottom right;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(26,42,108,0.12);
}
.chatbot-window.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.chatbot-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
  color: var(--white);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.chatbot-avatar {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  position: relative;
}
.chatbot-avatar::after {
  content: '';
  position: absolute;
  bottom: 1px; right: 1px;
  width: 10px; height: 10px;
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid var(--primary-dark);
}
.chatbot-header-info { flex: 1; }
.chatbot-header-info .bot-name { font-weight: 700; font-size: 0.95rem; }
.chatbot-header-info .bot-status { font-size: 0.72rem; opacity: 0.8; display: flex; align-items: center; gap: 0.3rem; }
.chatbot-header-actions { display: flex; gap: 0.4rem; }
.chatbot-header-btn {
  width: 30px; height: 30px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  border: none;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background var(--transition-fast);
}
.chatbot-header-btn:hover { background: rgba(255,255,255,0.25); }

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: var(--off-white);
  scroll-behavior: smooth;
}
.chatbot-messages::-webkit-scrollbar { width: 4px; }
.chatbot-messages::-webkit-scrollbar-thumb { background: var(--light-gray); border-radius: 2px; }

.chat-msg {
  display: flex;
  gap: 0.6rem;
  align-items: flex-end;
  animation: fadeInUp 0.3s ease;
}
.chat-msg.bot { flex-direction: row; }
.chat-msg.user { flex-direction: row-reverse; }

.chat-msg-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}
.chat-msg.user .chat-msg-avatar { background: var(--accent); }

.chat-bubble {
  max-width: 78%;
  padding: 0.65rem 1rem;
  border-radius: 18px;
  font-size: 0.84rem;
  line-height: 1.6;
  position: relative;
}
.chat-msg.bot .chat-bubble {
  background: var(--white);
  color: var(--text-body);
  border-radius: 4px 18px 18px 18px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--light-gray);
}
.chat-msg.user .chat-bubble {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  border-radius: 18px 4px 18px 18px;
}
.chat-msg-time {
  font-size: 0.65rem;
  color: var(--mid-gray);
  margin-top: 0.25rem;
  display: block;
  text-align: right;
}
.chat-msg.bot .chat-msg-time { text-align: left; }

/* Quick reply chips */
.chat-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.quick-reply-chip {
  background: rgba(26,42,108,0.07);
  color: var(--primary);
  border: 1px solid rgba(26,42,108,0.2);
  border-radius: var(--radius-full);
  padding: 0.3rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.quick-reply-chip:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Typing indicator */
.chat-typing {
  display: flex;
  gap: 0.6rem;
  align-items: flex-end;
}
.typing-dots {
  background: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: 4px 18px 18px 18px;
  padding: 0.7rem 1rem;
  display: flex;
  gap: 4px;
  align-items: center;
}
.typing-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--mid-gray);
  animation: typingBounce 1.2s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30%           { transform: translateY(-6px); }
}

/* Input Area */
.chatbot-input-area {
  padding: 0.85rem 1rem;
  background: var(--white);
  border-top: 1px solid var(--light-gray);
  flex-shrink: 0;
}
.chatbot-quick-topics {
  display: flex;
  gap: 0.4rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 0.6rem;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.chatbot-quick-topics::-webkit-scrollbar { display: none; }
.topic-chip {
  background: rgba(26,42,108,0.06);
  color: var(--primary);
  border: 1px solid rgba(26,42,108,0.15);
  border-radius: var(--radius-full);
  padding: 0.2rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.topic-chip:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.chatbot-input-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.chatbot-input {
  flex: 1;
  padding: 0.65rem 1rem;
  border: 2px solid var(--light-gray);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  outline: none;
  background: var(--off-white);
  color: var(--text-dark);
  transition: border-color var(--transition-fast);
}
.chatbot-input:focus { border-color: var(--primary); background: var(--white); }
.chatbot-send {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: all var(--transition-base);
}
.chatbot-send:hover { background: var(--accent); transform: scale(1.08); }

/* Powered by bar */
.chatbot-powered {
  text-align: center;
  font-size: 0.65rem;
  color: var(--mid-gray);
  padding: 0.35rem 0 0;
}
.chatbot-powered span { color: var(--primary); font-weight: 700; }

@media (max-width: 480px) {
  .chatbot-window { width: calc(100vw - 2rem); right: 1rem; bottom: 8rem; height: 480px; }
  .chatbot-fab { right: 1rem; }
}
