/* ============================================================
   EduPortal — Sahifaga Xos Stillar
   ============================================================ */

/* ===== INDEX — HERO ===== */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--navy) 0%, var(--deep) 50%, #0f2a50 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 80px 48px 60px;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(232,160,32,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 860px;
}

.hero-badge {
  display: inline-block;
  background: rgba(232, 160, 32, 0.15);
  border: 1px solid rgba(232, 160, 32, 0.3);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 6px 20px;
  border-radius: 20px;
  margin-bottom: 28px;
  animation: fadeUp 0.8s ease both;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(42px, 7vw, 80px);
  font-weight: 900;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 24px;
  animation: fadeUp 0.8s 0.1s ease both;
}

.hero h1 span { color: var(--accent); }

.hero p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto 40px;
  animation: fadeUp 0.8s 0.2s ease both;
}

.hero-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeUp 0.8s 0.3s ease both;
}

.stats-row {
  display: flex;
  justify-content: center;
  margin-top: 70px;
  animation: fadeUp 0.8s 0.4s ease both;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  overflow: hidden;
}

.stat {
  text-align: center;
  padding: 24px 48px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.stat:last-child { border-right: none; }

.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 40px;
  font-weight: 900;
  color: var(--accent);
}

.stat-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
}

/* --- Features Section --- */
.features {
  padding: 100px 48px;
  background: var(--white);
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 4vw, 50px);
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 16px;
}

.section-sub {
  font-size: 17px;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.7;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  margin-top: 60px;
}

.feature-card {
  background: var(--light);
  border-radius: 16px;
  padding: 36px 32px;
  transition: all 0.3s;
  border: 1px solid rgba(0,0,0,0.06);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.3s;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

.feature-card:hover::before { transform: scaleX(1); }

.feature-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 24px;
}

.feature-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.feature-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

/* --- Teachers Preview --- */
.teachers-preview {
  padding: 100px 48px;
  background: var(--light);
}

.teachers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 24px;
  margin-top: 60px;
}

.teacher-card {
  background: var(--white);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  border: 1px solid rgba(0,0,0,0.06);
  transition: all 0.3s;
  cursor: pointer;
}

.teacher-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

.teacher-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  border: 3px solid var(--accent);
  background: var(--light);
}

.teacher-card h4 {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.teacher-card .dept {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 14px;
}

.counts { display: flex; justify-content: center; gap: 16px; }

.count-item { font-size: 12px; color: var(--muted); }

.count-item strong {
  color: var(--navy);
  display: block;
  font-size: 18px;
  font-weight: 700;
}

/* ===== TEACHER PROFILE ===== */
.profile-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--deep) 100%);
  padding: 110px 48px 60px;
  position: relative;
  overflow: hidden;
}

.profile-hero::before {
  content: '';
  position: absolute;
  top: -150px; right: -150px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(232,160,32,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.profile-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.avatar-big {
  width: 140px; height: 140px;
  border-radius: 50%;
  border: 4px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  background: rgba(255,255,255,0.05);
  flex-shrink: 0;
}

.profile-info h1 {
  font-family: 'Playfair Display', serif;
  font-size: 40px; font-weight: 900;
  color: var(--white); margin-bottom: 8px;
}

.profile-title { font-size: 16px; color: var(--accent); font-weight: 600; margin-bottom: 6px; }
.profile-dept { font-size: 15px; color: rgba(255,255,255,0.6); margin-bottom: 20px; }

.profile-bio {
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
  max-width: 600px;
  margin-bottom: 24px;
}

.profile-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }

.tag {
  background: rgba(232,160,32,0.15);
  border: 1px solid rgba(232,160,32,0.3);
  color: var(--accent);
  font-size: 12px; font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
}

.profile-stats { display: flex; gap: 32px; }

.p-stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 32px; font-weight: 900;
  color: var(--accent);
}

.p-stat-label { font-size: 13px; color: rgba(255,255,255,0.5); }

/* --- Profile Tabs --- */
.tabs-wrap {
  background: var(--white);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  position: sticky;
  top: 68px; z-index: 50;
}

.tabs {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  padding: 0 48px;
}

.tab {
  padding: 18px 24px;
  font-size: 14px; font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  background: none;
  border-top: none; border-left: none; border-right: none;
  font-family: 'DM Sans', sans-serif;
}

.tab.active, .tab:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.content-area {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.content-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 28px; font-weight: 900;
  color: var(--navy);
}

.count-badge {
  background: var(--navy);
  color: var(--white);
  font-size: 13px; font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
}

/* --- Book Cards (profile & books page) --- */
.books-grid,
.books-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 24px;
}

.book-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.07);
  transition: all 0.3s;
}

.book-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.12);
}

.book-cover {
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  position: relative;
}
.read-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.35);
    transition: all 0.25s ease;
    cursor: pointer;
}

    .read-btn:hover {
        background: linear-gradient(135deg, #1557b0, #0a2f6b);
        box-shadow: 0 6px 18px rgba(26, 115, 232, 0.5);
        transform: translateY(-2px);
    }

    .read-btn:active {
        transform: translateY(0px);
        box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
    }

.read-btn-arrow {
    transition: transform 0.25s ease;
}

.read-btn:hover .read-btn-arrow {
    transform: translateX(4px);
}
.c1 { background: linear-gradient(145deg, #1a3a6b, #0a1628); }
.c2 { background: linear-gradient(145deg, #2d6a4f, #1b4332); }
.c3 { background: linear-gradient(145deg, #7b2d8b, #4a1060); }
.c4 { background: linear-gradient(145deg, #c0392b, #922b21); }
.c5 { background: linear-gradient(145deg, #d4880a, #8a5a00); }
.c6 { background: linear-gradient(145deg, #1a5276, #0d2c47); }

.book-badge {
  position: absolute;
  top: 12px; left: 12px;
  padding: 4px 12px;
  border-radius: 10px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.5px;
}

.badge-new  { background: var(--accent); color: var(--navy); }
.badge-pop  { background: #e74c3c; color: white; }
.badge-free { background: #27ae60; color: white; }

.book-year-tag,
.book-year {
  position: absolute;
  bottom: 12px; right: 12px;
  background: rgba(0,0,0,0.4);
  color: white;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 8px;
}

.book-body, .book-info { padding: 20px; }

.book-body h4, .book-info h4 {
  font-family: 'Playfair Display', serif;
  font-size: 15px; font-weight: 700;
  color: var(--navy); margin-bottom: 4px;
  line-height: 1.4;
}

.book-author { font-size: 13px; color: var(--accent); font-weight: 600; margin-bottom: 6px; }
.book-type, .book-type-tag {
  display: inline-block;
  background: var(--light);
  color: var(--navy);
  font-size: 11px; font-weight: 600;
  padding: 3px 10px;
  border-radius: 8px;
  margin-bottom: 14px;
}

.book-stats { display: flex; gap: 14px; margin-bottom: 16px; }
.book-stats span { font-size: 12px; color: var(--muted); }

.book-actions { display: flex; gap: 8px; }

.btn-dl {
  flex: 1;
  padding: 10px;
  background: var(--navy);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  font-family: 'DM Sans', sans-serif;
}

.btn-dl:hover { background: var(--accent); color: var(--navy); }

.btn-view {
  padding: 10px 14px;
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-view:hover { background: var(--light); }

.download-btn {
  width: 100%;
  padding: 8px;
  background: var(--navy);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-family: 'DM Sans', sans-serif;
}

.download-btn:hover { background: var(--accent); color: var(--navy); }

/* --- Video Cards --- */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.video-card {
  background: var(--white);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.07);
  transition: all 0.3s;
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.1);
}

.video-thumb {
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
}

.v1 { background: linear-gradient(135deg, #0a1628, #1a3a6b); }
.v2 { background: linear-gradient(135deg, #1b4332, #2d6a4f); }
.v3 { background: linear-gradient(135deg, #4a1060, #7b2d8b); }
.v4 { background: linear-gradient(135deg, #7b1a1a, #c0392b); }

.play-btn, .play-big {
  width: 56px; height: 56px;
  background: rgba(232, 160, 32, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: transform 0.2s;
}

.play-big { width: 80px; height: 80px; font-size: 32px; }

.video-thumb:hover .play-btn,
.featured-thumb:hover .play-big { transform: scale(1.1); }

.vid-duration, .video-duration {
  position: absolute;
  bottom: 10px; right: 10px;
  background: rgba(0,0,0,0.7);
  color: white;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.teacher-mini {
  position: absolute;
  top: 10px; left: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,0.5);
  padding: 4px 10px;
  border-radius: 20px;
}

.teacher-mini span { font-size: 11px; color: rgba(255,255,255,0.85); }

.video-info { padding: 18px; }

.video-info h4, .vid-title {
  font-size: 15px; font-weight: 700;
  color: var(--navy); margin-bottom: 6px;
  line-height: 1.4;
}

.vid-subject {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 10px;
}

.video-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.video-meta .views, .video-meta .date { font-size: 12px; color: var(--muted); }

.watch-btn {
  width: 100%;
  margin-top: 12px;
  padding: 9px;
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
  border-radius: 8px;
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
}

.watch-btn:hover { background: var(--navy); color: var(--white); }

/* --- Featured Video (videos page) --- */
.featured {
  background: var(--navy);
  border-radius: 20px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 48px;
}

.featured-thumb {
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a3a6b, #0a1628);
  position: relative;
  cursor: pointer;
}

.featured-label {
  position: absolute;
  top: 16px; left: 16px;
  background: var(--accent);
  color: var(--navy);
  font-size: 11px; font-weight: 700;
  padding: 4px 12px;
  border-radius: 10px;
  letter-spacing: 1px;
}

.featured-info {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-info .new-badge {
  display: inline-block;
  background: rgba(232,160,32,0.15);
  border: 1px solid rgba(232,160,32,0.3);
  color: var(--accent);
  font-size: 11px; font-weight: 700;
  padding: 4px 12px;
  border-radius: 10px;
  margin-bottom: 16px;
  width: fit-content;
}

.featured-info h2 {
  font-family: 'Playfair Display', serif;
  font-size: 26px; font-weight: 900;
  color: var(--white);
  margin-bottom: 12px;
  line-height: 1.3;
}

.featured-info p {
  font-size: 15px;
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
  margin-bottom: 20px;
}

.featured-meta { display: flex; gap: 16px; }
.featured-meta span { font-size: 13px; color: rgba(255,255,255,0.5); }

/* ===== ARTICLES PAGE ===== */
.main-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 48px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
}

.articles-list { display: flex; flex-direction: column; gap: 20px; }

.article-card {
  background: var(--white);
  border-radius: 16px;
  padding: 28px 32px;
  border: 1px solid rgba(0,0,0,0.07);
  transition: all 0.3s;
  border-left: 4px solid transparent;
}

.article-card:hover {
  transform: translateX(4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
  border-left-color: var(--accent);
}

.article-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 14px;
}

.article-meta-top {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.year-chip {
  background: var(--navy);
  color: var(--white);
  font-size: 12px; font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
}

.indexed-chip {
  background: #27ae60;
  color: white;
  font-size: 11px; font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

.article-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 20px; font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
  line-height: 1.4;
}

.article-author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.author-chip {
  background: var(--light);
  border: 1px solid rgba(232,160,32,0.3);
  color: var(--navy);
  font-size: 12px; font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}

.article-abstract {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.article-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.a-tag {
  background: var(--light);
  color: var(--navy);
  font-size: 11px; font-weight: 600;
  padding: 4px 12px;
  border-radius: 10px;
}

.article-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.article-journal { font-size: 13px; color: var(--muted); font-style: italic; }

.article-actions { display: flex; gap: 8px; }

.btn-read {
  padding: 8px 20px;
  background: var(--navy);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
}

.btn-read:hover { background: var(--accent); color: var(--navy); }

.btn-cite {
  padding: 8px 14px;
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
}

.btn-cite:hover { background: var(--light); }

/* --- Sidebar --- */
.sidebar { display: flex; flex-direction: column; gap: 24px; }

.side-card {
  background: var(--white);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid rgba(0,0,0,0.07);
}

.side-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 18px; font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent);
}

.top-author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.top-author:last-child { border-bottom: none; }

.author-ava {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: var(--light);
  flex-shrink: 0;
}

.author-info h5 { font-size: 14px; font-weight: 700; color: var(--navy); }
.author-info span { font-size: 12px; color: var(--muted); }

.keyword-cloud { display: flex; flex-wrap: wrap; gap: 8px; }

.kw {
  background: var(--light);
  color: var(--navy);
  font-size: 12px; font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid rgba(0,0,0,0.08);
}

.kw:hover { background: var(--navy); color: var(--white); }

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.stat-row:last-child { border-bottom: none; }
.stat-row span:first-child { font-size: 14px; color: var(--muted); }
.stat-row span:last-child { font-size: 14px; font-weight: 700; color: var(--navy); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .main-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

@media (max-width: 768px) {
  .hero { padding: 80px 20px 60px; }
  .stats-row { flex-wrap: wrap; }
  .features, .teachers-preview { padding: 60px 20px; }
  .profile-hero { padding: 90px 20px 40px; }
  .profile-wrapper { grid-template-columns: 1fr; gap: 24px; text-align: center; }
  .profile-stats { justify-content: center; }
  .tabs { padding: 0 20px; }
  .content-area { padding: 32px 20px; }
  .featured { grid-template-columns: 1fr; }
  .main-layout { padding: 40px 20px; }
}
