/* Electro4u site styles added on top of the LearnUp theme (new-add.css is the theme file; keep custom rules here). */

/* Instructor designation tag (teacher_profiles.designation) */
.designation-tag { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; line-height: 1; padding: 6px 10px; border-radius: 50rem; color: #6d28d9; background: linear-gradient(135deg, #f3e8ff, #e0e7ff); border: 1px solid #ddd6fe; white-space: nowrap; }
.instructor-card .instructor-avatar img, .tutor-card .tutor-thumb img { box-shadow: 0 0 0 4px #fff, 0 10px 24px -10px rgba(76, 29, 149, .45); }

/* Detail-page gradient hero + sticky in-page tabs (course and bundle detail) */
.course-hero { background: linear-gradient(120deg, #ec77ab 0%, #7873f5 100%); color: #fff; padding: 125px 0 44px; }
.course-hero .breadcrumb-item, .course-hero .breadcrumb-item a, .course-hero .breadcrumb-item.active { color: rgba(255,255,255,.85); }
.course-hero .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.6); }
.course-hero-title { color: #fff; font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; line-height: 1.25; max-width: 900px; margin-bottom: 12px; }
.hero-chip { background: rgba(255,255,255,.18); color: #fff; border-radius: 999px; padding: 5px 14px; font-size: 13px; font-weight: 500; }
.hero-chip-hot { background: #fbbf24; color: #1e293b; }
.course-hero-facts { gap: 12px 36px; }
.course-hero-facts span { display: block; font-size: 12px; opacity: .8; }
.course-hero-facts strong { font-size: 15px; }
.course-tabs { display: flex; gap: 4px; background: #fff; border: 1px solid #e8ecf3; border-radius: 12px; padding: 6px; position: sticky; top: 76px; z-index: 5; overflow-x: auto; }
.course-tabs a { padding: 9px 18px; border-radius: 9px; color: #475569; font-weight: 500; white-space: nowrap; }
.course-tabs a:hover, .course-tabs a.active { background: #eaf1ff; color: #2563eb; }

/* Book covers (store cards + book page): fixed 3:4 box, image fills it without stretching the card */
.book-cover { position: relative; display: block; aspect-ratio: 3 / 4; height: auto !important; overflow: hidden; }
.book-cover > img { position: absolute; inset: 0; width: 100%; height: 100% !important; min-height: 0 !important; object-fit: cover; } /* theme .h-100 = 100vh + min-height 580px */

/* ---- Home page spacing (Modification Part 2): tighter hero, Search Course and Explore Our Courses ---- */
.hero_banner.hero-compact { padding: 118px 0 3rem; min-height: 0; } /* top = fixed header (~80px) + breathing room */
.hero_banner.hero-compact .hero-text { font-size: 1.05rem; opacity: .9; max-width: 560px; }
.hero_banner .hero-avatar { width: 42px; height: 42px; object-fit: cover; }
/* Hero student avatars: 8-12 overlapping circles; students without a photo show coloured initials */
.hero_banner .hero-avatars { display: flex; flex-wrap: nowrap; align-items: center; }
.hero_banner .hero-avatars .avatar-single { position: relative; display: inline-block; flex-shrink: 0; }
.hero_banner .hero-avatars .avatar-single + .avatar-single { margin-left: -12px; }
.hero_banner .hero-avatars .avatar-single:hover { z-index: 2; transform: translateY(-2px); transition: transform .15s; }
.hero_banner .hero-avatars .hero-avatar { border: 2px solid #fff !important; box-shadow: 0 2px 6px rgba(15, 23, 42, .18); background: #e2e8f0; }
.hero_banner .hero-avatar-initials { display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; font-weight: 600; letter-spacing: .02em; }
@media (max-width: 420px) {
    .hero_banner .hero-avatar { width: 28px !important; height: 28px !important; }
    .hero_banner .hero-avatars .avatar-single + .avatar-single { margin-left: -9px !important; }
    .hero_banner .reviews-caption .text-light { white-space: nowrap; font-size: 13px; }
}
@media (max-width: 575px) {
    .hero_banner .hero-avatar { width: 34px; height: 34px; }
    .hero_banner .hero-avatar-initials { font-size: 12px; }
    .hero_banner .hero-avatars .avatar-single + .avatar-single { margin-left: -10px; }
}
.hero_banner .hero-main-img { max-height: 540px; width: auto; margin: 0 auto; display: block; }
.hero_banner .hero-float-img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.search-course-section { padding: 44px 0 40px; }
.search-course-section .section-title { margin-bottom: 22px; }
section#explore-courses { padding: 48px 0 52px; }
@media (max-width: 767px) {
    .search-course-section { padding: 32px 0 30px; }
    section#explore-courses { padding: 36px 0 40px; }
}

/* ---- Course cards: Live / Trending status badges ---- */
.course-status-badges { position: absolute; left: 12px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 6px; z-index: 2; }
.course-status { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; line-height: 1; padding: 6px 10px; border-radius: 50rem; color: #fff; box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .35); }
.course-status.is-live { background: #dc2626; }
.course-status.is-live .dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: course-live-pulse 1.4s ease-in-out infinite; }
.course-status.is-trending { background: linear-gradient(135deg, #f97316, #f59e0b); }
@keyframes course-live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* ---- Blog: compact previous / next post links (the theme's .h-100 is 100vh) ---- */
.post-nav-link { display: flex; flex-direction: column; justify-content: center; height: 100%; padding: 12px 16px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.post-nav-link:hover { border-color: #c7d2fe; box-shadow: 0 6px 16px -10px rgba(37, 99, 235, .45); }
.post-nav-link .post-nav-label { font-size: 12px; color: #6b7280; }
.post-nav-link .post-nav-title { font-size: 14px; font-weight: 600; color: #111827; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Certificate banner photo (footer CTA): beside the text on desktop, full width under it on phones */
.cert-banner .cert-banner-photo { position: relative; text-align: center; }
.cert-banner .cert-banner-photo img { width: 100%; max-width: 460px; max-height: 340px; object-fit: contain; border-radius: 18px; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .25)); }
@media (max-width: 991px) { .cert-banner.has-photo { padding-bottom: 40px; } .cert-banner .cert-banner-photo img { max-height: 260px; } }

/* ---- About Us faculty photos (Admin > Homepage Sections > About Us - Faculty) ---- */
.faculty-card { transition: box-shadow .15s, transform .15s; }
.faculty-card:hover { box-shadow: 0 12px 28px -18px rgba(37, 99, 235, .55); transform: translateY(-2px); }
.faculty-photo { position: relative; width: 110px; height: 110px; border-radius: 50%; overflow: hidden; background: linear-gradient(135deg, #e0e7ff, #f3e8ff); box-shadow: 0 0 0 4px #fff, 0 10px 24px -12px rgba(76, 29, 149, .5); }
.faculty-photo span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: 700; color: #6d28d9; }
.faculty-photo img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 575px) { .faculty-photo { width: 84px; height: 84px; } .faculty-photo span { font-size: 26px; } }

/* ---- Book Preview (sample pages) ---- */
.book-preview-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
/* Sample pages keep the A4 page shape (210 x 297 mm) and show the whole page, never cropped */
.book-preview-thumb { position: relative; padding: 6px; border: 1px solid #e5e7eb; border-radius: 6px; overflow: hidden; background: #fff; aspect-ratio: 210 / 297; cursor: zoom-in; box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 6px 14px -10px rgba(15, 23, 42, .35); transition: transform .15s, box-shadow .15s; }
.book-preview-thumb:hover { transform: translateY(-3px); box-shadow: 0 14px 28px -14px rgba(15, 23, 42, .5); }
.book-preview-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }
.book-preview-no { position: absolute; right: 6px; bottom: 6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: rgba(15, 23, 42, .75); color: #fff; font-size: 12px; line-height: 22px; text-align: center; }
.book-preview-sheet { display: block; margin: 0 auto; background: #fff; aspect-ratio: 210 / 297; height: min(84vh, calc((100vw - 32px) * 297 / 210)); max-width: 100%; padding: 10px; border-radius: 4px; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .6); }
.book-preview-full { width: 100%; height: 100%; object-fit: contain; display: block; }
#bookPreviewModal .modal-dialog { max-width: min(92vw, calc(84vh * 210 / 297 + 40px)); }
#bookPreviewModal .carousel-inner { background: transparent !important; }
.book-preview-arrow { width: 42px; height: 42px; border-radius: 50%; background: rgba(15, 23, 42, .7); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; }
@media (max-width: 575px) { .book-preview-strip { grid-template-columns: repeat(3, 1fr); gap: 8px; } .book-preview-thumb { padding: 3px; } }

/* ==== Spacing below the header (Mobile modification PDF) ====
   Desktop: the header is absolutely positioned OVER the page (84px), so pages reserve that space.
   Phones / tablets (<= 991px): the theme puts the header back in the page flow, so nothing may reserve it again.
   Pages used to clear it with an empty 80px "page title" band PLUS the next section's 80px top padding. */
:root { --hdr-overlay: 84px; --hdr-gap: 40px; }
@media (max-width: 991px) { :root { --hdr-overlay: 0px; --hdr-gap: 20px; } }

/* inner pages (courses, projects, bundles, books, blog, about, contact, teachers, cart, ...): the band only covers the
   overlaid header, its breadcrumb / title markup is switched off */
section.page-title.bg-gredient { padding: 0 !important; height: var(--hdr-overlay); min-height: 0; overflow: hidden; }
section.page-title.bg-gredient > .container { display: none; }
section.page-title + section { padding-top: var(--hdr-gap) !important; }

/* pages with their own hero: course / project / bundle details (.course-hero), webinars, home */
.course-hero { padding-top: calc(var(--hdr-overlay) + 36px); }
.wbl-hero, .wb-hero { padding-top: calc(var(--hdr-overlay) + 40px) !important; }
@media (max-width: 991px) {
    section.page-title.bg-gredient { display: none; }
    .course-hero { padding-top: 18px; padding-bottom: 26px; }
    .wbl-hero, .wb-hero { padding-top: 22px !important; padding-bottom: 32px !important; }
    .hero_banner.hero-compact { padding-top: 14px; padding-bottom: 28px; }
    .course-hero + section.pt-5, .wbl-hero + section.pt-5, .wb-hero + section { padding-top: 1.25rem !important; }
    section { padding-top: 44px; padding-bottom: 44px; } /* theme default 80px */
}

/* ==== Course page section tabs (Overview / Who Should Enroll / Curriculum / ...) ====
   Five tabs no longer fit on phones and on many Windows laptop widths: the bar scrolled sideways and showed a
   (thick, on Windows) scrollbar. The scrollbar is hidden (swipe / auto-scroll to the active tab instead) and the
   bar sits exactly under the fixed header (84px desktop, ~80px phones). */
.course-tabs { top: 92px; scrollbar-width: none; -ms-overflow-style: none; scroll-behavior: smooth; }
.course-tabs::-webkit-scrollbar { display: none; height: 0; }
@media (min-width: 992px) {
    .course-tabs a { flex: 1 1 auto; text-align: center; padding: 9px 12px; }
}
@media (max-width: 991px) {
    .course-tabs { top: 82px; padding: 5px; border-radius: 10px; }
    .course-tabs a { padding: 8px 13px; font-size: 14px; }
}

/* ==== .h-100 ====
   The theme redefines Bootstrap's .h-100 as "height: 100vh; min-height: 580px", so every card, link, image or form
   using it (blog previous / next, instructor cards, book covers, ...) became a screen-tall empty box on phones.
   Restore the Bootstrap meaning (100% of the parent) everywhere except full-screen theme sections. */
.h-100:not(section):not(.hero_banner) { height: 100% !important; min-height: 0 !important; }

/* ---- Colourful cards (courses, projects, bundles, books): every fact in its own colour ---- */
.card-colorful { border-radius: 16px !important; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease, border-color .18s; }
.card-colorful:hover { transform: translateY(-4px); box-shadow: 0 18px 36px -18px rgba(37, 99, 235, .45); border-color: #c7d7fe !important; }
.card-colorful .education-title a, .card-colorful h4 a { color: #0f2a6b; }
.card-colorful .education-title a:hover, .card-colorful h4 a:hover { color: #2563eb; }
.card-badge-lessons { background: linear-gradient(135deg, #2563eb, #7c3aed) !important; color: #fff !important; font-weight: 600; box-shadow: 0 4px 12px -4px rgba(37, 99, 235, .6); }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.meta-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; line-height: 1.2; padding: 5px 10px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.meta-chip i { font-size: 12px; }
.meta-chip.is-blue { background: #eaf1ff; color: #1d4ed8; border-color: #d6e4ff; }
.meta-chip.is-purple { background: #f3e8ff; color: #7c3aed; border-color: #e9d5ff; }
.meta-chip.is-green { background: #e8f8ef; color: #15803d; border-color: #c9efd8; }
.meta-chip.is-amber { background: #fff6e0; color: #b45309; border-color: #fde8b0; }
.meta-chip.is-amber i { color: #f59e0b; }
.meta-chip.is-pink { background: #fdf0f6; color: #be185d; border-color: #fbd5e6; }
.meta-chip .meta-muted { font-weight: 500; opacity: .7; }
.meta-chip .meta-strike { font-weight: 500; color: #94a3b8; margin-left: 2px; }
.card-colorful .meta-chip.fs-6 { font-size: 14px !important; }
.card-teacher { color: #0f172a; font-weight: 600; }
.card-cta { background: linear-gradient(135deg, #2563eb, #4f46e5); color: #fff !important; border: 0; font-weight: 600; box-shadow: 0 6px 14px -8px rgba(37, 99, 235, .8); transition: filter .15s, transform .15s; }
.card-cta:hover { filter: brightness(1.08); transform: translateX(2px); color: #fff; }
.card-colorful .education-footer { border-top: 1px dashed #e5e9f2 !important; }
@media (max-width: 575px) { .meta-chip { font-size: 12px; padding: 4px 9px; } }
.cert-banner-img img { max-height: 100%; object-fit: contain; }

/* Hero "Learning Roadmap" button (links to /roadmap) */
.hero-roadmap-btn { background: #fde047; color: #0f172a !important; border: 2px solid #0f172a; font-weight: 700; box-shadow: 0 4px 0 #0f172a; transition: transform .12s, box-shadow .12s; }
.hero-roadmap-btn:hover { transform: translateY(2px); box-shadow: 0 2px 0 #0f172a; background: #facc15; }
