/* ============================================================
   Assam Mock Test Platform — Public Site Styles
   Modern, lightweight, fast — no heavy frameworks beyond Bootstrap 5.
   Google Fonts are loaded with preconnect for speed; everything else
   here is plain CSS (no build step needed) so this stays easy to
   maintain by hand.
   ============================================================ */

:root {
    --brand-primary: #2563eb;
    --brand-primary-dark: #1d4ed8;
    --brand-accent: #f59e0b;
    --brand-ink: #0f172a;
    --brand-muted: #64748b;
    --brand-bg: #f8fafc;
    --brand-radius: 1rem;
    --font-heading: 'Poppins', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--brand-bg);
    color: var(--brand-ink);
}

h1, h2, h3, h4, h5, h6,
.navbar-brand,
.hero-title {
    font-family: var(--font-heading);
}

.auth-page {
    min-height: 100vh;
}

a {
    text-decoration: none;
}

/* ---------- Buttons ---------- */
.btn {
    transition: all 0.2s ease;
    font-weight: 500;
}

.btn-primary {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--brand-primary-dark);
    border-color: var(--brand-primary-dark);
    transform: translateY(-1px);
}

/* ---------- Cards ---------- */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.1) !important;
}

/* ---------- Section headings ---------- */
.section-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--brand-primary);
}

.section-title {
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* ---------- Hero ---------- */
.hero-section {
    background: linear-gradient(135deg, #19007F 0%, #2b0fa8 60%, #3d1fd1 100%);
    position: relative;
    overflow: hidden;
    padding-top: 2.25rem;
    padding-bottom: 2.25rem;
}

.hero-section::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
    background-size: 22px 22px;
    opacity: 0.5;
    pointer-events: none;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-weight: 700;
    letter-spacing: -0.02em;
    font-size: 1.6rem;
}

.hero-section .lead {
    font-size: 0.95rem;
}

.hero-stats {
    gap: 1.25rem !important;
    margin-top: 1.5rem !important;
}

.hero-stats .stat-num {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
}

.hero-stats .small {
    font-size: 0.72rem;
}

.hero-section .badge {
    font-size: 0.7rem;
}

.hero-section .btn-lg {
    padding: 0.55rem 1.4rem;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .hero-section {
        padding-top: 3.5rem;
        padding-bottom: 3.5rem;
    }
    .hero-title {
        font-size: 2.75rem;
    }
    .hero-section .lead {
        font-size: 1.15rem;
    }
    .hero-stats .stat-num {
        font-size: 1.5rem;
    }
    .hero-stats .small {
        font-size: 0.85rem;
    }
}

/* ---------- Homepage slider ---------- */
.home-slider {
    border-radius: var(--brand-radius);
    overflow: hidden;
}

.home-slider .carousel-item img {
    width: 100%;
    height: 380px;
    object-fit: cover;
}

.home-slider .carousel-caption {
    text-align: left;
    left: 5%;
    right: auto;
    bottom: 12%;
    max-width: 60%;
    background: rgba(15, 23, 42, 0.55);
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    backdrop-filter: blur(2px);
}

@media (max-width: 767.98px) {
    .home-slider .carousel-item img {
        height: 200px;
    }
    .home-slider .carousel-caption {
        max-width: 90%;
        padding: 0.5rem 0.85rem;
        bottom: 6%;
    }
    .home-slider .carousel-caption h3 {
        font-size: 1rem;
    }
    .home-slider .carousel-caption p {
        display: none;
    }
}

/* ---------- Exam / content cards ---------- */
.exam-card .card-img-top,
.quiz-card .card-img-top,
.blog-card .card-img-top {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #f1f5f9;
}

.ebook-card .card-img-top {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: #f1f5f9;
}

.badge-free {
    background-color: #16a34a;
}

.badge-paid {
    background-color: var(--brand-accent);
    color: #1f2937;
}

/* ---------- Top scorers ---------- */
.scorer-card {
    background: linear-gradient(160deg, #fff 60%, #eff6ff 100%);
}

/* ---------- Footer ---------- */
.site-footer a {
    color: inherit;
    opacity: 0.85;
}

.site-footer a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-muted {
    opacity: 0.7;
}

.footer-divider {
    opacity: 0.15;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
}

.footer-social a:hover {
    background: var(--brand-primary);
    text-decoration: none;
}

/* ---------- Clickable cards: image/title link without color change ---------- */
.card-link-plain {
    color: inherit;
    text-decoration: none;
}

.card-link-plain:hover,
.card-link-plain:focus {
    color: inherit;
    text-decoration: none;
}

.card-img-link {
    display: block;
}

/* ---------- Category / tag pills ---------- */
.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    white-space: nowrap;
}

/* ---------- Star ratings ---------- */
.star-rating {
    color: #f59e0b;
    font-size: 0.9rem;
}

.star-rating.star-rating-lg {
    font-size: 1.15rem;
}

.review-card {
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: 1rem;
    padding: 1.1rem 1.25rem;
}

.review-form-card {
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: 1rem;
    padding: 1.5rem;
}

.star-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.star-input input {
    display: none;
}

.star-input label {
    font-size: 1.75rem;
    color: #d1d5db;
    cursor: pointer;
    padding: 0 0.15rem;
    transition: color 0.15s ease;
}

.star-input input:checked ~ label,
.star-input label:hover,
.star-input label:hover ~ label {
    color: #f59e0b;
}

/* ---------- Rich text content (Quill-authored fields) ---------- */
.rich-content img,
.post-content img,
.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

.rich-content blockquote,
.post-content blockquote,
.page-content blockquote {
    border-left: 3px solid var(--brand-primary);
    padding-left: 1rem;
    color: var(--brand-muted);
}

/* ---------- Breadcrumbs ---------- */
.breadcrumb {
    display: inline-flex;
    background: #fff;
    border: 1px solid #eef0f4;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    font-size: 0.85rem;
    margin-bottom: 0;
}

.breadcrumb-item + .breadcrumb-item {
    padding-left: 0.6rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1;
    color: #c7cdd6;
    padding-right: 0.6rem;
    vertical-align: middle;
}

.breadcrumb-item a {
    color: var(--brand-primary);
    font-weight: 500;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--brand-muted);
    font-weight: 600;
}

/* ---------- Exam category tiles (homepage) ---------- */
.section-banner {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
    color: #fff;
    border-radius: 1rem;
    padding: 1.1rem 1.5rem;
}

.section-banner h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
}

.category-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: 1rem;
    padding: 1.25rem 0.75rem;
    height: 100%;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.75rem 1.5rem rgba(15, 23, 42, 0.08);
    border-color: var(--brand-primary);
}

.category-tile-logo {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-tile-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.category-tile-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brand-ink);
    line-height: 1.25;
}

@media (min-width: 768px) {
    .category-tile-logo {
        width: 80px;
        height: 80px;
    }
    .category-tile-title {
        font-size: 0.95rem;
    }
}

/* ---------- Leaderboard ---------- */
.leaderboard-tabs .nav-link {
    border-radius: 999px;
    padding: 0.5rem 1.4rem;
    font-weight: 600;
    color: var(--brand-ink);
    background: #fff;
    border: 1px solid #eef0f4;
}

.leaderboard-tabs .nav-link.active {
    background: var(--brand-primary);
    color: #fff;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: 1rem;
    padding: 0.9rem 1.25rem;
    margin-bottom: 0.75rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.leaderboard-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1.25rem rgba(15, 23, 42, 0.06);
}

.leaderboard-row.rank-gold { border-color: #fbbf24; background: linear-gradient(90deg, #fffbeb, #fff); }
.leaderboard-row.rank-silver { border-color: #cbd5e1; background: linear-gradient(90deg, #f8fafc, #fff); }
.leaderboard-row.rank-bronze { border-color: #d6a06a; background: linear-gradient(90deg, #fef3ea, #fff); }

.lb-rank {
    width: 34px;
    flex-shrink: 0;
    text-align: center;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--brand-muted);
}

.rank-gold .lb-rank { color: #d97706; font-size: 1.3rem; }
.rank-silver .lb-rank { color: #64748b; font-size: 1.2rem; }
.rank-bronze .lb-rank { color: #b45309; font-size: 1.15rem; }

.student-avatar {
    flex-shrink: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.lb-info {
    flex-grow: 1;
    min-width: 0;
}

.lb-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lb-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--brand-muted);
}

.lb-score {
    text-align: right;
    flex-shrink: 0;
}

.lb-pct {
    font-weight: 700;
    font-size: 1.05rem;
    color: #16a34a;
}

@media (max-width: 575.98px) {
    .lb-meta span:nth-child(1) { display: none; }
    .leaderboard-row { padding: 0.7rem 0.9rem; gap: 0.6rem; }
}

/* ---------- Sticky nav ---------- */
.site-navbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid #eef0f4;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

.site-navbar .navbar-brand {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--brand-ink) !important;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 0.65rem;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
    color: #fff;
    font-size: 1.05rem;
}

.site-navbar .nav-link {
    font-weight: 500;
    color: var(--brand-ink);
    padding: 0.5rem 0.9rem !important;
    border-radius: 0.6rem;
    transition: background 0.15s ease, color 0.15s ease;
}

.site-navbar .nav-link:hover {
    background: #f1f5f9;
    color: var(--brand-primary);
}

.site-navbar .nav-cta {
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 0.35rem 0.9rem rgba(37, 99, 235, 0.25);
}

.site-navbar .navbar-toggler {
    border: none;
    font-size: 1.5rem;
    color: var(--brand-ink);
    padding: 0.15rem 0.4rem;
}

.site-navbar .navbar-toggler:focus {
    box-shadow: none;
}

@media (max-width: 991.98px) {
    .site-navbar .navbar-collapse {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid #eef0f4;
    }
    .site-navbar .navbar-nav {
        gap: 0.15rem;
    }
    .site-navbar .nav-cta {
        display: inline-block;
        margin-top: 0.5rem;
    }
}

/* ---------- Floating WhatsApp button ---------- */
.floating-whatsapp-btn {
    position: fixed;
    bottom: 22px;
    right: 22px;
    width: 56px;
    height: 56px;
    background: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    box-shadow: 0 0.5rem 1.25rem rgba(37, 211, 102, 0.45);
    z-index: 1040;
    transition: transform 0.2s ease;
}

.floating-whatsapp-btn:hover {
    color: #fff;
    transform: scale(1.08);
}

/* ---------- Homepage About section ---------- */
.about-section-box {
    background: linear-gradient(160deg, #fff, #f8fafc);
    border: 1px solid #eef0f4;
    border-radius: 1.5rem;
    padding: 2.5rem;
}

/* ---------- FAQ accordion ---------- */
.faq-item {
    border: 1px solid #eef0f4 !important;
    border-radius: 1rem !important;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.faq-item .accordion-button {
    font-weight: 600;
    background: #fff;
}

.faq-item .accordion-button:not(.collapsed) {
    background: #eff6ff;
    color: var(--brand-primary-dark);
    box-shadow: none;
}

.faq-item .accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
}

/* ---------- Badge tags (SALE/NEW/HOT etc.) ---------- */
.home-badge-tag {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    color: #fff;
    z-index: 2;
    box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.12);
}

.badge-tag-sale { background: #dc2626; }
.badge-tag-new  { background: #16a34a; }
.badge-tag-hot  { background: #ea580c; }
.badge-tag-default { background: var(--brand-primary); }

/* ---------- Simple admin-editable hero ---------- */
.hero-simple {
    padding: 2.5rem 0 2rem;
    text-align: center;
    background: var(--brand-bg);
}

.hero-simple h1 {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.01em;
    color: var(--brand-ink);
    max-width: 780px;
    margin: 0 auto 0.6rem;
}

.hero-simple p {
    color: var(--brand-muted);
    font-size: 0.95rem;
    max-width: 640px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .hero-simple {
        padding: 3.5rem 0 2.5rem;
    }
    .hero-simple h1 {
        font-size: 2.1rem;
    }
    .hero-simple p {
        font-size: 1.05rem;
    }
}

/* ---------- Exam Showcase cards (rich category cards) ---------- */
.showcase-card {
    position: relative;
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: 1.25rem;
    padding: 1.25rem;
    height: 100%;
    display: flex;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.showcase-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.75rem 1.5rem rgba(15, 23, 42, 0.08);
}

.showcase-card-logo {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 0.85rem;
    background: #f8fafc;
    border: 1px solid #eef0f4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.showcase-card-logo img {
    max-width: 78%;
    max-height: 78%;
    object-fit: contain;
}

.showcase-card-body h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.showcase-card-body p {
    font-size: 0.82rem;
    color: var(--brand-muted);
    margin-bottom: 0.65rem;
}

.showcase-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    font-weight: 600;
    margin-right: 0.85rem;
}

.showcase-stat.locked { color: #dc2626; }
.showcase-stat.unlocked { color: #16a34a; }

/* ---------- WhatsApp CTA banner (homepage only) ---------- */
.whatsapp-cta {
    background: linear-gradient(135deg, #25d366, #1fb655);
    border-radius: 1.25rem;
    padding: 1.5rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.whatsapp-cta-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.whatsapp-cta-body {
    flex-grow: 1;
    min-width: 200px;
}

.whatsapp-cta-body h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.whatsapp-cta-body p {
    font-size: 0.9rem;
    opacity: 0.92;
    margin-bottom: 0;
}

.whatsapp-cta-btn {
    background: #fff;
    color: #128c3e;
    font-weight: 700;
    padding: 0.65rem 1.5rem;
    border-radius: 999px;
    white-space: nowrap;
    transition: transform 0.15s ease;
}

.whatsapp-cta-btn:hover {
    color: #128c3e;
    transform: translateY(-2px);
}

.whatsapp-cta.compact {
    padding: 1rem 1.25rem;
}

.whatsapp-cta.compact .whatsapp-cta-icon {
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
}

.whatsapp-cta.compact .whatsapp-cta-body h2 {
    font-size: 0.95rem;
}

.whatsapp-cta.compact .whatsapp-cta-body p {
    font-size: 0.8rem;
}

/* ---------- Misc ---------- */
.rounded-4 {
    border-radius: var(--brand-radius) !important;
}

.no-scrollbar-x {
    overflow-x: auto;
    white-space: nowrap;
}
