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

:root {
  --nptel-crimson: #9b1c1c;
  --nptel-blue: #1a56db;
  --nptel-text: #111827;
  --nptel-gray: #6b7280;
  --nptel-pink-bg: #fce7f3;
  --nptel-pink-card: #fde8f0;
  --nptel-mint: #ecfdf5;
  --nptel-border: #e5e7eb;
  --nptel-footer-bg: #f9fafb;
  --shadow: 0 1px 4px rgba(0,0,0,0.08);
  --radius: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Roboto', sans-serif; color: var(--nptel-text); background: #fff; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ═══ NAVBAR ═══ */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  background: #fff;
  border-bottom: 1px solid var(--nptel-border);
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.nav-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center;
  padding: 0 24px; height: 58px; gap: 0;
}
.nav-logo { display: flex; align-items: center; gap: 8px; margin-right: 40px; flex-shrink: 0; }
.nav-logo img { height: 40px; width: auto; }

.nav-links { display: flex; align-items: stretch; gap: 0; flex: 1; height: 100%; }
.nav-item { position: relative; display: flex; align-items: center; }
.nav-link-btn {
  display: flex; align-items: center; gap: 4px;
  padding: 0 14px; height: 100%;
  font-size: 14px; font-weight: 400; color: #374151;
  cursor: pointer; white-space: nowrap; transition: color 0.15s;
  background: none; border: none; font-family: inherit;
  border-bottom: 3px solid transparent;
}
.nav-link-btn:hover, .nav-link-btn.active { color: var(--nptel-crimson); border-bottom-color: var(--nptel-crimson); }
.nav-link-btn .arrow { font-size: 9px; margin-left: 2px; }

/* Dropdown */
.dropdown {
  position: absolute; top: 100%; left: 0;
  background: #fff; border: 1px solid #e5e7eb;
  border-radius: 6px; min-width: 210px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: all 0.18s ease; z-index: 300; padding: 6px 0;
}
.nav-item:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a {
  display: block; padding: 9px 20px;
  font-size: 13.5px; color: #374151; transition: all 0.15s;
}
.dropdown a:hover { background: #f9fafb; color: var(--nptel-crimson); padding-left: 26px; }

.nav-right { margin-left: auto; }
.btn-login {
  background: var(--nptel-blue); color: #fff;
  padding: 8px 20px; border-radius: 6px;
  font-size: 14px; font-weight: 500;
  transition: background 0.15s; border: none; cursor: pointer;
  font-family: inherit; display: inline-block;
}
.btn-login:hover { background: #1e40af; }

/* ═══ HERO CAROUSEL ═══ */
.hero-carousel { position: relative; overflow: hidden; height: 420px; background: #111; }
.hero-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s ease;
  display: flex; align-items: flex-end;
}
.hero-slide.active { opacity: 1; z-index: 2; }
.hero-slide img.slide-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
}
.slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
}
.slide-caption {
  position: relative; z-index: 3; color: #fff;
  padding: 28px 48px; max-width: 900px;
}
.slide-caption h2 { font-size: 26px; font-weight: 700; line-height: 1.3; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.slide-caption p { font-size: 14px; margin-top: 6px; opacity: 0.9; }

.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 10;
  background: rgba(255,255,255,0.15); border: 1.5px solid rgba(255,255,255,0.5);
  color: #fff; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 18px; transition: background 0.2s;
  backdrop-filter: blur(4px);
}
.carousel-arrow:hover { background: rgba(255,255,255,0.3); }
.carousel-arrow.prev { left: 16px; }
.carousel-arrow.next { right: 16px; }
.carousel-dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 10; }
.c-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.45); cursor: pointer; transition: all 0.2s; }
.c-dot.active { background: #fff; width: 22px; border-radius: 4px; }

/* ═══ STATS SECTION ═══ */
.stats-section { background: var(--nptel-pink-bg); padding: 36px 24px; }
.stats-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4,1fr); gap: 16px;
}
.stat-card {
  background: #fff; border-radius: 12px; padding: 24px 20px 20px;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
  justify-content: space-between; gap: 16px;
}
.stat-card-text { font-size: 16px; font-weight: 400; color: var(--nptel-text); line-height: 1.6; }
.stat-card-text strong { font-weight: 700; color: var(--nptel-crimson); }
.btn-explore {
  display: inline-block; padding: 8px 18px;
  border: 1.5px solid #374151; border-radius: 20px;
  font-size: 13px; font-weight: 500; color: #374151;
  transition: all 0.2s; cursor: pointer; width: fit-content;
}
.btn-explore:hover { background: #374151; color: #fff; }

/* ═══ SECTION COMMON ═══ */
.section { padding: 56px 24px; }
.section-alt { background: #f9fafb; }
.section-mint { background: var(--nptel-mint); }
.container { max-width: 1200px; margin: 0 auto; }
.section-head { margin-bottom: 32px; }
.section-head h2 { font-size: 26px; font-weight: 700; color: var(--nptel-text); margin-bottom: 6px; }
.section-head p { font-size: 15px; color: var(--nptel-gray); }

/* ═══ COURSE FACULTY GRID ═══ */
.faculty-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 16px; }
.faculty-card {
  background: #fff; border-radius: 10px; overflow: hidden;
  box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s;
}
.faculty-card:hover { transform: translateY(-4px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
.faculty-card img { width: 100%; height: 180px; object-fit: cover; object-position: top; }
.faculty-card-body { padding: 12px; }
.faculty-card-body h4 { font-size: 13px; font-weight: 600; color: var(--nptel-text); margin-bottom: 2px; }
.faculty-card-body p { font-size: 12px; color: var(--nptel-gray); }

/* ═══ YOUTUBE ═══ */
.yt-wrap {
  position: relative; padding-bottom: 56.25%; border-radius: 12px;
  overflow: hidden; box-shadow: 0 4px 24px rgba(0,0,0,0.15); max-width: 860px; margin: 0 auto;
}
.yt-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }

/* ═══ NEWS TABS ═══ */
.news-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--nptel-border); margin-bottom: 24px; }
.news-tab {
  padding: 10px 20px; font-size: 14px; font-weight: 500; cursor: pointer;
  color: var(--nptel-gray); border-bottom: 3px solid transparent; margin-bottom: -2px;
  transition: all 0.2s;
}
.news-tab.active { color: var(--nptel-crimson); border-bottom-color: var(--nptel-crimson); }
.news-panel { display: none; }
.news-panel.active { display: block; }
.news-list { list-style: none; }
.news-item { padding: 14px 0; border-bottom: 1px solid var(--nptel-border); display: flex; gap: 14px; align-items: flex-start; }
.news-item img { width: 100px; height: 70px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.news-item-body h4 { font-size: 14px; font-weight: 500; margin-bottom: 4px; line-height: 1.4; }
.news-item-body p { font-size: 12.5px; color: var(--nptel-gray); }

/* ═══ TESTIMONIALS ═══ */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 18px; }
.testimonial-card {
  background: #fff; border-radius: 10px; padding: 20px;
  box-shadow: var(--shadow); border-left: 4px solid var(--nptel-crimson);
}
.test-quote { font-size: 14px; color: #4b5563; line-height: 1.7; margin-bottom: 14px; font-style: italic; }
.test-author { display: flex; align-items: center; gap: 10px; }
.test-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--nptel-crimson); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; flex-shrink: 0;
}
.test-name { font-size: 13.5px; font-weight: 700; }
.test-info { font-size: 12px; color: var(--nptel-gray); }

/* ═══ INSTITUTE LOGOS ═══ */
.logos-strip { background: #fff; padding: 32px 24px; border-top: 1px solid var(--nptel-border); }
.logos-row { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: 40px; flex-wrap: wrap; }
.inst-logo { height: 48px; width: auto; object-fit: contain; opacity: 0.8; transition: opacity 0.2s; }
.inst-logo:hover { opacity: 1; }

/* ═══ COURSES GRID ═══ */
.courses-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); gap: 20px; }
.course-card {
  background: #fff; border-radius: 10px; overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--nptel-border);
  transition: transform 0.2s, box-shadow 0.2s; cursor: pointer;
}
.course-card:hover { transform: translateY(-4px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
.course-thumb {
  height: 150px; background: linear-gradient(135deg, #1e3a5f, #0f3460);
  display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.course-thumb span { font-size: 48px; position: relative; z-index: 1; }
.course-badge {
  position: absolute; top: 8px; right: 8px;
  background: var(--nptel-crimson); color: #fff;
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px;
}
.course-body { padding: 14px; }
.course-disc { font-size: 11px; font-weight: 700; color: var(--nptel-crimson); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 5px; }
.course-name { font-size: 14px; font-weight: 600; margin-bottom: 5px; line-height: 1.4; }
.course-inst { font-size: 12px; color: var(--nptel-gray); margin-bottom: 8px; }
.course-meta { display: flex; gap: 10px; font-size: 11.5px; color: #9ca3af; }

/* Filter tabs */
.filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.filter-tab {
  padding: 6px 16px; border-radius: 20px; font-size: 13px;
  border: 1.5px solid var(--nptel-border); background: #fff; color: #555;
  cursor: pointer; transition: all 0.2s;
}
.filter-tab:hover, .filter-tab.active { background: var(--nptel-crimson); color: #fff; border-color: var(--nptel-crimson); }

/* ═══ FOOTER ═══ */
.footer { background: #111827; color: #d1d5db; padding: 48px 24px 0; }
.footer-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 36px;
}
.footer-brand img { height: 48px; margin-bottom: 12px; filter: brightness(0) invert(1); }
.footer-brand p { font-size: 13px; color: #9ca3af; line-height: 1.7; margin-bottom: 16px; }
.footer-social { display: flex; gap: 10px; }
.social-link {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.08); display: flex; align-items: center;
  justify-content: center; color: #ccc; font-size: 15px; transition: all 0.2s;
}
.social-link:hover { background: var(--nptel-crimson); color: #fff; }
.footer-col h4 { font-size: 12px; font-weight: 700; color: #f9fafb; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px; }
.footer-col a { display: block; font-size: 13px; color: #9ca3af; margin-bottom: 8px; transition: color 0.15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  max-width: 1200px; margin: 0 auto;
  border-top: 1px solid rgba(255,255,255,0.07); padding: 16px 0;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: 12.5px; color: #6b7280;
}
.footer-bottom a { color: #9ca3af; }
.footer-bottom a:hover { color: #fff; }

/* ═══ SEARCH BAR ═══ */
.search-bar {
  display: flex; background: #fff; border: 1.5px solid #d1d5db;
  border-radius: 8px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.search-bar input { flex: 1; padding: 11px 16px; border: none; outline: none; font-size: 14px; font-family: inherit; }
.search-bar button { background: var(--nptel-crimson); color: #fff; border: none; padding: 0 18px; cursor: pointer; font-size: 15px; }
.search-bar button:hover { background: #7f1d1d; }

/* ═══ CTA BANNER ═══ */
.cta-banner { background: linear-gradient(135deg, var(--nptel-crimson), #7f1d1d); color: #fff; padding: 52px 24px; text-align: center; }
.cta-banner h2 { font-size: 28px; font-weight: 700; margin-bottom: 10px; }
.cta-banner p { font-size: 15px; opacity: 0.85; margin-bottom: 24px; }
.btn-white { background: #fff; color: var(--nptel-crimson); padding: 11px 32px; border-radius: 6px; font-weight: 700; font-size: 14px; transition: all 0.2s; display: inline-block; }
.btn-white:hover { background: #f9fafb; transform: translateY(-1px); }

/* ═══ BTN PRIMARY ═══ */
.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--nptel-crimson); color: #fff;
  padding: 10px 24px; border-radius: 6px; font-weight: 600; font-size: 14px;
  transition: background 0.2s; border: none; cursor: pointer; font-family: inherit;
}
.btn-primary:hover { background: #7f1d1d; }
.btn-outline {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; color: var(--nptel-crimson);
  padding: 9px 20px; border-radius: 6px; font-weight: 600; font-size: 14px;
  border: 1.5px solid var(--nptel-crimson); transition: all 0.2s; cursor: pointer; font-family: inherit;
}
.btn-outline:hover { background: var(--nptel-crimson); color: #fff; }

/* ═══ RESPONSIVE ═══ */
@media(max-width:1024px) { .stats-grid { grid-template-columns: repeat(2,1fr); } .footer-grid { grid-template-columns: 1fr 1fr 1fr; } }
@media(max-width:768px) { .nav-links { display: none; } .stats-grid { grid-template-columns: 1fr 1fr; } .hero-carousel { height: 280px; } .slide-caption h2 { font-size: 18px; } }
@media(max-width:480px) { .stats-grid { grid-template-columns: 1fr; } .footer-grid { grid-template-columns: 1fr; } }
