/* ExamZoo – App-wide custom styles */

:root {
    --primary: #6C5CE7;
    --primary-dark: #5649c0;
    --accent: #A29BFE;
    --bg-page: #f8f6ff;
    --text-dark: #1e1b2e;
    --text-muted: #6b6b80;
    --card-radius: 18px;
    --font: 'Inter', system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

body {
    font-family: var(--font);
    background: var(--bg-page);
    color: var(--text-dark);
    margin: 0;
}

/* ── Navbar ───────────────────────────────────────────────── */
.app-nav {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(108, 92, 231, 0.12);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    padding: 0.6rem 0;
}

.app-brand {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary) !important;
    letter-spacing: -0.5px;
    text-decoration: none;
}

.app-brand i { opacity: 0.85; }

.app-nav .nav-link {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-dark) !important;
    padding: 0.45rem 1rem !important;
    border-radius: 8px;
    transition: background 0.18s, color 0.18s;
    text-decoration: none;
}

.app-nav .nav-link:hover {
    background: #ede9fe;
    color: var(--primary) !important;
}

.navbar-toggler {
    border: none;
    color: var(--text-dark);
    padding: 0.3rem 0.5rem;
}

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

/* ── Hero ─────────────────────────────────────────────────── */
.hero-section {
    background: linear-gradient(135deg, #4f1a9e 0%, #9333ea 45%, #ec4899 100%);
    padding: 72px 0 90px;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -12%;
    width: 560px;
    height: 560px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.35) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -8%;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.92);
    padding: 5px 16px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.25);
    margin-bottom: 1rem;
}

.hero-title {
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -1.5px;
    margin: 0.5rem 0 1rem;
}

.hero-subtitle {
    font-size: 1.05rem;
    opacity: 0.82;
    max-width: 460px;
    margin: 0 auto 2rem;
    line-height: 1.65;
}

.btn-hero-primary {
    background: white;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.92rem;
    padding: 11px 22px;
    border-radius: 12px;
    border: none;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s, box-shadow 0.2s, color 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.btn-hero-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.22);
    color: var(--primary-dark);
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.14);
    color: white;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 11px 22px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.38);
    backdrop-filter: blur(6px);
    transition: background 0.2s, transform 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.24);
    color: white;
    transform: translateY(-3px);
}

.hero-apps-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* ── Topics Section ───────────────────────────────────────── */
.topics-section {
    padding: 64px 0 80px;
    background:
        radial-gradient(ellipse at 10% 40%, rgba(147, 51, 234, 0.1) 0px, transparent 55%),
        radial-gradient(ellipse at 90% 10%, rgba(236, 72, 153, 0.08) 0px, transparent 55%),
        radial-gradient(ellipse at 60% 85%, rgba(99, 102, 241, 0.07) 0px, transparent 50%),
        #f8f6ff;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.5px;
    margin-bottom: 0.35rem;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ── Topic Cards ──────────────────────────────────────────── */
.topic-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--card-radius);
    padding: 1.6rem 1.4rem 1.35rem;
    text-decoration: none;
    color: white;
    height: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

.topic-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.16);
    color: white;
    text-decoration: none;
}

.topic-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
}

.topic-english::before  { background: linear-gradient(145deg, #4776E6, #8E54E9); }
.topic-hindi::before    { background: linear-gradient(145deg, #f7971e, #ffd200); }
.topic-gk::before       { background: linear-gradient(145deg, #11998e, #38ef7d); }
.topic-top10::before    { background: linear-gradient(145deg, #ee0979, #ff6a00); }
.topic-ai::before       { background: linear-gradient(145deg, #0f3460, #533483); }
.topic-elections::before{ background: linear-gradient(145deg, #373b44, #4286f4); }

.topic-card > * { position: relative; z-index: 1; }

.topic-icon-wrap {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.topic-name {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.topic-desc {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: auto;
    line-height: 1.45;
}

.topic-arrow {
    margin-top: 1.1rem;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: background 0.2s, transform 0.2s;
}

.topic-card:hover .topic-arrow {
    background: rgba(255, 255, 255, 0.35);
    transform: translateX(3px);
}

/* ── App Download Banner ──────────────────────────────────── */
.download-section {
    padding: 60px 0;
    background: white;
}

.download-card {
    background: linear-gradient(135deg, #1e1b2e 0%, #3d3068 100%);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    color: white;
    text-align: center;
}

.download-card h2 {
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
}

.download-card p {
    opacity: 0.75;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: white;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 0.88rem;
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.store-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    color: var(--primary);
    text-decoration: none;
}

.store-btn .store-icon { font-size: 1.3rem; }

.store-btn .store-text-sm {
    font-size: 0.68rem;
    font-weight: 500;
    opacity: 0.7;
    display: block;
    line-height: 1;
    text-align: left;
}

.store-btn .store-text-main {
    font-weight: 800;
    display: block;
    line-height: 1.2;
    text-align: left;
}

/* ── Footer ───────────────────────────────────────────────── */
.app-footer {
    background: var(--text-dark);
    color: white;
    padding: 40px 0 32px;
}

.footer-brand {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.18s;
}

.footer-links a:hover { color: white; }

.footer-apps {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 1rem 0;
}

.footer-app-btn {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    text-decoration: none;
    transition: background 0.2s;
}

.footer-app-btn:hover {
    background: var(--primary);
    color: white;
    text-decoration: none;
}

.footer-copy {
    font-size: 0.78rem;
    opacity: 0.4;
    margin-bottom: 0;
}

/* ── Inner-page Masthead ──────────────────────────────────── */
header.masthead {
    background: linear-gradient(135deg, #4f1a9e 0%, #9333ea 45%, #ec4899 100%);
    position: relative;
    padding: 5rem 0 3.5rem;
    color: white;
    overflow: hidden;
    margin-bottom: 0;
}

header.masthead::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

header.masthead .post-heading,
header.masthead .site-heading,
header.masthead .page-heading {
    color: white;
    position: relative;
    z-index: 1;
}

header.masthead .post-heading h1,
header.masthead .site-heading h1,
header.masthead .page-heading h1 {
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 0.4rem;
}

header.masthead .site-heading,
header.masthead .page-heading { text-align: center; }

header.masthead .subheading {
    display: block;
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

header.masthead .meta {
    display: block;
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 0.6rem;
}

header.masthead .meta a { color: white; text-decoration: underline; }

/* ── Post Listing (index pages) ───────────────────────────── */

/* Grid container – activates when a Bootstrap column directly owns post-previews */
.col-md-10:has(> .post-preview) {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
    max-width: 100%;
    padding-top: 1.75rem;
    padding-bottom: 2.5rem;
}

/* Hide the old <hr> separators – cards don't need them */
.col-md-10:has(> .post-preview) hr { display: none; }

/* Card */
.post-preview {
    background: white;
    border-radius: 14px;
    border: 1.5px solid rgba(108, 92, 231, 0.1);
    border-left: 3px solid var(--primary);
    padding: 1.1rem 1.25rem 1rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s, border-left-color 0.2s;
    display: flex;
    flex-direction: column;
}

.post-preview:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(108, 92, 231, 0.13);
    border-left-color: #ec4899;
}

.post-preview > a {
    text-decoration: none;
    color: var(--text-dark);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-preview > a:hover,
.post-preview:hover .post-title { color: var(--primary); }

.post-preview .post-title {
    font-size: 0.97rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.2px;
    margin-bottom: 0;
    flex: 1;
    transition: color 0.15s;
}

.post-preview .post-subtitle {
    font-size: 0.84rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.post-preview .post-meta {
    font-size: 0.73rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    padding-top: 0.6rem;
    border-top: 1px solid #f0edff;
}

.post-preview .post-meta a { color: var(--primary); text-decoration: none; }

hr.my-4 { border-color: rgba(108, 92, 231, 0.12); }

/* ── Article Content ──────────────────────────────────────── */
article.mb-4 {
    padding: 2.5rem 0 3rem;
}

article h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

article h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 1.5rem;
    color: var(--text-dark);
}

article p { line-height: 1.75; color: #374151; }

article .table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.9rem;
    margin-top: 1rem;
}

article .table th,
article .table td {
    padding: 0.6rem 0.8rem;
    vertical-align: middle;
}

article .table-bordered.border-primary {
    --bs-table-border-color: rgba(108, 92, 231, 0.25);
}

article .table thead th {
    background: linear-gradient(135deg, #4f1a9e, #9333ea);
    color: white;
    font-weight: 600;
    border-color: transparent;
}

article .table tbody tr:hover { background: rgba(108, 92, 231, 0.04); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 575px) {
    /* Tighten all container horizontal padding on mobile */
    .container,
    .container-fluid { padding-right: 0.75rem !important; padding-left: 0.75rem !important; }

    /* Tighten row gutters */
    .row { --bs-gutter-x: 0.75rem; }

    .hero-section { padding: 44px 0 56px; }

    .hero-title { letter-spacing: -1px; }

    header.masthead { padding: 3rem 0 2rem; }

    .topics-section { padding: 40px 0 48px; }

    .topic-card { padding: 1.3rem 1.1rem 1.1rem; }

    .topic-icon-wrap {
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
        border-radius: 11px;
    }

    .topic-name { font-size: 0.92rem; }

    .section-title { font-size: 1.55rem; }

    .col-md-10:has(> .post-preview) {
        grid-template-columns: 1fr !important;
        gap: 0.65rem;
        padding-top: 1.25rem;
        padding-bottom: 1.75rem;
    }

    article.mb-4 { padding: 1.5rem 0 2rem; }

    .download-card { padding: 1.75rem 1rem; }
    .download-card h2 { font-size: 1.35rem; }

    .app-footer { padding: 28px 0 24px; }
}

@media (max-width: 380px) {
    .btn-hero-primary,
    .btn-hero-secondary { font-size: 0.84rem; padding: 10px 16px; }
}
