/* ==========================================================================
   AKTU ResultDesk — Blog Stylesheet
   Dark glass UI, blue accent, fluid type — responsive mobile → desktop
   ========================================================================== */

:root {
  /* Color tokens */
  --bg: #f6f9f4;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-hover: #f0f4ef;
  --border: #dde7dc;
  --border-strong: #c3d4c0;

  --primary: #15803d;
  --primary-dark: #116932;
  --primary-light: #15803d;

  --text: #12261b;
  --text-muted: #5c6b61;

  --telegram: #0088cc;
  --whatsapp: #25d366;

  /* Radii */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;

  /* Shadows */
  --shadow-card: 0 20px 50px -25px rgba(18, 38, 27, 0.25);
  --shadow-primary: 0 4px 15px rgba(21, 128, 61, 0.25);

  color-scheme: light;
}

/* -------------------------------------------------------------------------
   Reset & base
   ------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  line-height: 1.25;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--primary-light);
}

img {
  max-width: 100%;
  display: block;
}

ul, ol {
  padding-left: 1.25em;
}

:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 3px;
  border-radius: 4px;
}

/* -------------------------------------------------------------------------
   Background glow shapes
   ------------------------------------------------------------------------- */
.glow-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  will-change: transform;
}

.shape-1 {
  width: 480px;
  height: 480px;
  top: -160px;
  left: -120px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  animation: float-a 22s ease-in-out infinite;
}

.shape-2 {
  width: 420px;
  height: 420px;
  top: 30%;
  right: -160px;
  background: radial-gradient(circle, var(--telegram) 0%, transparent 70%);
  animation: float-b 26s ease-in-out infinite;
}

.shape-3 {
  width: 380px;
  height: 380px;
  bottom: -180px;
  left: 20%;
  background: radial-gradient(circle, var(--whatsapp) 0%, transparent 70%);
  opacity: 0.22;
  animation: float-a 30s ease-in-out infinite reverse;
}

@keyframes float-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 60px) scale(1.08); }
}

@keyframes float-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, 40px) scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  .shape { animation: none; }
  html { scroll-behavior: auto; }
}

/* Smaller / softer glow on narrow screens so it doesn't dominate */
@media (max-width: 640px) {
  .shape { filter: blur(60px); opacity: 0.25; }
  .shape-1, .shape-2, .shape-3 { width: 260px; height: 260px; }
}

/* -------------------------------------------------------------------------
   Layout shell
   ------------------------------------------------------------------------- */
.app-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

@media (max-width: 640px) {
  .app-container { padding: 0 1rem; }
}

/* -------------------------------------------------------------------------
   Glass / card primitives
   ------------------------------------------------------------------------- */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.card {
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}

/* -------------------------------------------------------------------------
   Header
   ------------------------------------------------------------------------- */
.main-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.25rem 0;
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(to bottom, var(--bg) 60%, transparent);
}

.brand-link {
  min-width: 0; /* allow text truncation instead of overflow */
}

.brand-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.brand-text span:first-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.9rem 1.4rem;
  border: none;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  box-shadow: var(--shadow-primary);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  white-space: nowrap;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 8px 24px rgba(21, 128, 61, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

@media (max-width: 480px) {
  .main-header .btn-primary {
    padding: 0.55rem 1rem !important;
    font-size: 0.8rem !important;
  }
  .brand-text span:last-child { display: none; } /* hide "Student Hub" eyebrow on very small screens */
}

/* -------------------------------------------------------------------------
   Blog index — hero + grid
   ------------------------------------------------------------------------- */
.blog-section-header {
  text-align: center;
  max-width: 620px;
  margin: 2rem auto 3rem;
}

.blog-section-header h1 {
  font-size: clamp(1.8rem, 4.5vw, 2.75rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--text) 30%, var(--primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.blog-section-header p {
  color: var(--text-muted);
  font-size: clamp(0.95rem, 2vw, 1.05rem);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  padding-bottom: 3rem;
}

.blog-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.blog-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card);
}

.blog-card-image {
  position: relative;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(21, 128, 61, 0.18) 0%, rgba(29, 78, 216, 0.06) 100%);
  border-bottom: 1px solid var(--border);
}

.blog-card-image i {
  font-size: 2.75rem;
  color: var(--primary-light);
  opacity: 0.85;
}

.blog-card-badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border-strong);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary-light);
}

.blog-card-content {
  padding: 1.35rem 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.blog-card-meta i { margin-right: 0.3rem; }

.blog-card-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.blog-card-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
  flex: 1;
  margin-bottom: 1.1rem;
}

.blog-card-footer {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--primary-light);
  font-weight: 600;
  font-size: 0.88rem;
  transition: gap 0.2s ease, color 0.2s ease;
}

.blog-card-footer i {
  transition: transform 0.2s ease;
}

.blog-card:hover .blog-card-footer i {
  transform: translateX(3px);
}

/* -------------------------------------------------------------------------
   Article pages
   ------------------------------------------------------------------------- */
.article-container {
  margin: 1.5rem auto 3rem;
  padding: 2.5rem 3rem 3rem;
  max-width: 820px;
  width: 100%;
}

.article-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 1.75rem;
  transition: color 0.2s ease, gap 0.2s ease;
}

.article-back-link:hover {
  color: var(--primary-light);
  gap: 0.75rem;
}

.article-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.article-header h1 {
  font-size: clamp(1.6rem, 4vw, 2.35rem);
  font-weight: 800;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.article-meta i { margin-right: 0.35rem; color: var(--primary-light); }

.article-content h2 {
  font-size: clamp(1.2rem, 2.6vw, 1.5rem);
  font-weight: 700;
  margin-top: 2.2rem;
  padding-top: 0.2rem;
}

.article-content h3 {
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  font-weight: 700;
  margin-top: 1.6rem;
  color: var(--primary-light);
}

.article-content p,
.article-content li {
  color: #33453a;
  font-size: 1rem;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.2rem;
}

.article-content li {
  margin-bottom: 0.45rem;
}

.article-content strong {
  color: var(--text);
}

.article-content a {
  color: var(--primary-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
  font-size: 0.9rem;
}

thead {
  background: rgba(21, 128, 61, 0.1);
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

th {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  color: var(--primary-light);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(18, 38, 27, 0.02); }

@media (max-width: 640px) {
  table { min-width: 420px; font-size: 0.82rem; }
  th, td { padding: 0.6rem 0.75rem; }

  .btn-primary {
    white-space: normal !important;
    text-align: center;
    padding: 0.75rem 1.25rem !important;
    font-size: 0.88rem !important;
    line-height: 1.3 !important;
  }
}

/* CTA boxes */
.blog-cta-box {
  margin: 2.25rem 0;
  padding: 1.75rem;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(21, 128, 61, 0.1) 0%, rgba(21, 128, 61, 0.02) 100%);
  border: 1px solid rgba(21, 128, 61, 0.25);
  text-align: center;
}

.blog-cta-box h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.blog-cta-box p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
}

.blog-cta-box .btn-primary {
  width: auto;
  padding: 0.85rem 1.75rem;
}

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
.app-footer {
  margin-top: auto;
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--border);
}

.footer-links a {
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--primary-light) !important;
}

/* -------------------------------------------------------------------------
   Responsive: tablet & mobile
   ------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .article-container {
    padding: 1.75rem 1.5rem 2rem;
    margin: 1rem auto 2rem;
    border-radius: var(--r-md);
  }

  .blog-cta-box { padding: 1.35rem; }
}

@media (max-width: 480px) {
  body { font-size: 15px; }

  .article-container { padding: 1.35rem 1.1rem 1.75rem; }

  .article-meta { gap: 0.75rem 1rem; font-size: 0.78rem; }

  .footer-links {
    gap: 0.75rem 1.1rem;
  }
}

/* Floating Telegram Button */
.telegram-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    z-index: 9999;
    cursor: pointer;
    text-decoration: none !important;
    overflow: hidden;
    border-radius: 30px;
    isolation: isolate;
    transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1), transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.telegram-float.expanded,
.telegram-float:hover {
    width: 155px;
}

.telegram-icon-box {
    position: absolute;
    right: 0;
    top: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.telegram-icon-box i {
    font-size: 28px;
    flex-shrink: 0;
}

.telegram-strip {
    position: absolute;
    right: 0;
    top: 0;
    height: 60px;
    width: 60px;
    border-radius: 30px;
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 14px;
    box-sizing: border-box;
    overflow: hidden;
    isolation: isolate;
    transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.telegram-float.expanded .telegram-strip,
.telegram-float:hover .telegram-strip {
    width: 155px;
}

.telegram-text {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.15s ease-out, transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    height: 100%;
    line-height: 1;
}

.telegram-float.expanded .telegram-text,
.telegram-float:hover .telegram-text {
    opacity: 1;
    transform: translateX(0);
}

/* Hover and active states */
.telegram-float:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.telegram-float:active {
    transform: translateY(-2px) scale(0.98);
}

@media (max-width: 600px) {
    .telegram-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        border-radius: 25px;
    }
    
    .telegram-float.expanded,
    .telegram-float:hover {
        width: 135px;
    }
    
    .telegram-icon-box {
        width: 50px;
        height: 50px;
    }
    
    .telegram-icon-box i {
        font-size: 24px;
    }
    
    .telegram-strip {
        height: 50px;
        width: 50px;
        padding-left: 12px;
        border-radius: 25px;
    }
    
    .telegram-float.expanded .telegram-strip,
    .telegram-float:hover .telegram-strip {
        width: 135px;
    }
    
    .telegram-text {
        font-size: 0.8rem;
    }
}

