/*
Theme Name: ToppersPoint Theme
Theme URI: https://topperspoint.com/
Author: Antigravity
Author URI: https://topperspoint.com/
Description: A premium, high-performance educational theme for Quizzes and Study Materials.
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: topperspoint-theme
*/

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    /* Account for sticky header */
}

:root {
    --primary: #4f46e5;
    --primary-glow: rgba(79, 70, 229, 0.15);
    --secondary: #db2777;
    --accent: #7c3aed;
    --background: #f0f2f5;
    --foreground: #0f172a;
    --card: #ffffff;
    --card-border: rgba(0, 0, 0, 0.06);
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.08);
    --success: #059669;
    --error: #dc2626;
    --warning: #d97706;

    --font-main: 'Plus Jakarta Sans', sans-serif;
    --font-heading: 'Outfit', sans-serif;

    --readable-width: 760px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-main);
    background-color: var(--background);
    color: #475569;
    /* Refined text color for light mode */
    overflow-x: hidden;
    line-height: 1.8;
}

/* Reading Progress Bar */
.scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 9999;
}

.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    transition: width 0.1s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.2;
    color: var(--foreground);
    letter-spacing: -0.02em;
}

.premium-listing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

@media (max-width: 1200px) {
    .premium-listing-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

@media (max-width: 992px) {
    .premium-listing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .premium-listing-grid {
        grid-template-columns: 1fr;
    }
}

/* Standardized Blog Cards */
.blog-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
    border-color: var(--primary-glow);
}

.blog-card-image {
    width: 100%;
    aspect-ratio: 2.3 / 1;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc, #eff6ff);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.4;
    background-image: radial-gradient(var(--primary-glow) 1px, transparent 1px);
    background-size: 20px 20px;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 11px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-card-title {
    font-size: 17px;
    font-family: var(--font-heading);
    font-weight: 800;
    margin-bottom: 8px;
    line-height: 1.3;
    color: var(--foreground);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: auto;
}

.blog-card-title a {
    color: inherit;
    text-decoration: none;
}

.blog-card-excerpt {
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: auto;
    flex: 1;
}

.blog-card-footer {
    padding-top: 16px;
    border-top: 1px solid #f8fafc;
    margin-top: auto;
}

.blog-card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 800;
    font-size: 14px;
    transition: all 0.3s ease;
    padding: 8px 16px;
    background: var(--primary-glow);
    border-radius: 99px;
}

.blog-card-link:hover {
    gap: 12px;
    background: var(--primary);
    color: white;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

.interior-main {
    padding-top: 140px;
    padding-bottom: 120px;
}

@media (max-width: 768px) {
    .interior-main {
        padding-top: 85px;
        padding-bottom: 100px;
    }

    .container.mobile-fluid {
        padding: 0 16px;
        width: 95%;
    }
}

.max-w-readable {
    max-width: var(--readable-width);
    margin-left: auto;
    margin-right: auto;
}

/* Premium Single Post Layout */
.single-post-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 60px;
    align-items: flex-start;
}

.post-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

@media (max-width: 1100px) {
    .single-post-grid {
        grid-template-columns: 1fr;
        gap: 80px;
    }

    .post-sidebar {
        position: static;
    }
}

/* Premium Utilities */
.premium-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mesh-gradient {
    background: linear-gradient(45deg, #f0f4ff 0%, #ffffff 50%, #fff0f6 100%);
    position: relative;
}

.mesh-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 0% 0%, rgba(79, 70, 229, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(219, 39, 119, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.glass-card {
    background: var(--card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 32px;
}

.btn {
    padding: 14px 32px;
    border-radius: 100px;
    /* Modern pill buttons */
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: none;
    font-family: var(--font-heading);
    text-decoration: none;
    font-size: 15px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px var(--primary-glow);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.03);
    color: var(--foreground);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

/* Sophisticated Typography */
.entry-content {
    font-family: var(--font-main);
}

.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content blockquote {
    margin-bottom: 2rem;
    font-size: 19px;
    line-height: 2.0;
    color: #475569;
    letter-spacing: -0.01em;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    margin: 4.5rem 0 1.8rem;
    color: var(--foreground);
    font-family: var(--font-heading);
    font-weight: 800;
}

.entry-content h1:first-child,
.entry-content h2:first-child,
.entry-content h3:first-child {
    margin-top: 0;
}

.entry-content h2 {
    font-size: 42px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 20px;
}

.entry-content h3 {
    font-size: 32px;
}

.entry-content h4 {
    font-size: 26px;
}

.entry-content h5 {
    font-size: 20px;
}

@media (max-width: 768px) {
    .entry-content h2 {
        font-size: 32px;
    }

    .entry-content h3 {
        font-size: 26px;
    }

    .entry-content h4 {
        font-size: 22px;
    }

    .entry-content p {
        font-size: 17px;
    }
}

.entry-content ul,
.entry-content ol {
    padding-left: 1.5rem;
    margin-bottom: 2.5rem;
}

.entry-content li {
    margin-bottom: 1.25rem;
}

.entry-content strong,
.entry-content b {
    color: var(--foreground);
    font-weight: 700;
}

.entry-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 6px;
    transition: all 0.3s ease;
}

.entry-content a:hover {
    color: var(--secondary);
    text-decoration-color: var(--secondary);
}

/* Responsive Platform Enhancements */
@media (max-width: 1024px) {
    .hero-premium h1 {
        font-size: 42px !important;
    }

    .nav-container {
        gap: 20px !important;
    }
}

@media (max-width: 768px) {
    .hero-premium {
        padding: 100px 0 60px !important;
    }

    .hero-premium h1 {
        font-size: 32px !important;
    }

    .hero-premium p {
        font-size: 12px !important;
    }

    .nav-container {
        display: flex !important;
        justify-content: space-between !important;
        padding: 0 20px !important;
    }

    .header-search,
    .header-actions {
        display: none !important;
    }

    .main-nav {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: #f1f5f9;
        border-radius: 10px;
        color: var(--foreground);
        cursor: pointer;
    }

    .exam-card-hover {
        padding: 16px !important;
    }

    .exam-card-hover h4 {
        font-size: 15px !important;
    }

    .footer-sitemap {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
    }

    /* Mobile Layout Fixes */
    .section-header-flex {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 24px !important;
    }

    .section-header-flex .btn {
        width: 100% !important;
        border-radius: 14px !important;
        /* Less rounded for better mobile fit */
        padding: 12px 24px !important;
    }

    .premium-grid-boards,
    .premium-listing-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .premium-listing-grid>a,
    .premium-listing-grid>div {
        padding: 24px 16px !important;
        border-radius: 20px !important;
    }

    .premium-listing-grid h3 {
        font-size: 16px !important;
        margin-bottom: 8px !important;
    }

    .premium-listing-grid .author-avatar-box,
    .premium-listing-grid div[style*="width: 64px"] {
        width: 40px !important;
        height: 40px !important;
        margin-bottom: 16px !important;
    }

    .premium-listing-grid i {
        width: 20px !important;
        height: 20px !important;
    }

    .blog-section-homepage .container.mobile-fluid {
        width: 95% !important;
        padding: 0 10px !important;
    }
}

/* Mobile Menu Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 2000;
    display: none;
    flex-direction: column;
    padding: 40px;
}

.mobile-overlay.active {
    display: flex;
}

.mobile-overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.mobile-menu-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.mobile-menu-list a {
    font-size: 24px;
    font-weight: 800;
    color: var(--foreground);
    text-decoration: none;
    font-family: var(--font-heading);
}

/* Icon Styles from Image */
.icon-rounded-box {
    width: 64px;
    height: 64px;
    background: #f8faff;
    border: 1px solid #edf2ff;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4f46e5;
    transition: all 0.3s ease;
}

.quick-link-item:hover .icon-rounded-box {
    background: #4f46e5;
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.2);
}

.quick-link-item span {
    font-size: 14px;
    font-weight: 700;
    color: #475569;
    margin-top: 12px;
}

/* Premium Search Bar */
.premium-search-container {
    max-width: 700px;
    margin: 0 auto 80px;
    position: relative;
}

.premium-search-wrapper {
    position: relative;
}

.premium-search-input {
    width: 100%;
    padding: 24px 150px 24px 70px;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    font-size: 18px;
    font-weight: 600;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    outline: none;
    background: white;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}

.premium-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 10px 40px var(--primary-glow);
    transform: translateY(-2px);
}

.premium-search-icon {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    color: var(--primary);
    pointer-events: none;
}

.premium-search-btn {
    position: absolute;
    right: 10px;
    top: 10px;
    bottom: 10px;
    padding: 0 35px;
    border-radius: 16px;
    font-size: 15px;
    z-index: 2;
}

@media (max-width: 768px) {
    .premium-search-container {
        margin-bottom: 60px;
        padding: 0 15px;
    }

    .premium-search-input {
        padding: 20px 120px 20px 56px;
        font-size: 16px;
        border-radius: 20px;
    }

    .premium-search-icon {
        left: 20px;
        width: 24px;
        height: 24px;
    }

    .premium-search-btn {
        padding: 0 25px;
        font-size: 14px;
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    .premium-search-input {
        padding: 16px 100px 16px 48px;
        font-size: 14px;
        border-radius: 16px;
    }

    .premium-search-icon {
        left: 16px;
        width: 20px;
        height: 20px;
    }

    .premium-search-btn {
        padding: 0 18px;
        font-size: 13px;
        border-radius: 10px;
        right: 6px;
        top: 6px;
        bottom: 6px;
    }
}

/* Single Post Premium Styles */
.single-post-header {
    margin-bottom: 60px;
}

.single-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.meta-sep {
    color: #cbd5e1;
}

.meta-date {
    color: #94a3b8;
}

.single-post-title {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 40px;
    color: var(--foreground);
    letter-spacing: -0.02em;
}

.single-post-content-full,
.resource-content-full {
    width: 100%;
    max-width: 100% !important;
}

.featured-image-wrapper {
    background: white;
    padding: 10px;
    border-radius: 40px;
    border: 1px solid #f1f5f9;
    margin-bottom: 60px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

.featured-image-wrapper img {
    width: 100%;
    height: auto;
    border-radius: 32px;
    display: block;
}

.author-card {
    margin-top: 80px;
    padding: 48px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 32px;
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.author-avatar-box {
    flex-shrink: 0;
}

.author-avatar-box img {
    border-radius: 50%;
    width: 96px;
    height: 96px;
    border: 4px solid white;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.author-content {
    flex: 1;
}

.author-tag {
    text-transform: uppercase;
    font-weight: 800;
    color: var(--primary);
    font-size: 11px;
    letter-spacing: 2px;
    margin-bottom: 8px;
    display: block;
}

.author-name {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--foreground);
}

.author-bio {
    color: #64748b;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 24px;
}

.author-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* Sidebar Widgets */
.sidebar-widget {
    background: white;
    padding: 32px;
    border-radius: 24px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.sidebar-widget-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--foreground);
}

.sidebar-widget-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #f1f5f9;
}

/* Table of Contents Widget */
#tp-toc-container {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

#tp-toc-container::-webkit-scrollbar {
    width: 4px;
}

#tp-toc-container::-webkit-scrollbar-thumb {
    background: #f1f5f9;
    border-radius: 10px;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 12px;
}

.toc-list a {
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: block;
    line-height: 1.5;
}

.toc-list a:hover,
.toc-list a.active {
    color: var(--primary);
    transform: translateX(4px);
}

.toc-list .toc-h3 {
    padding-left: 16px;
    font-size: 13px;
    color: #94a3b8;
}

/* Related Posts Section */
.related-posts-section {
    margin-top: 100px;
    padding-top: 80px;
    border-top: 2px solid #f1f5f9;
}

@media (max-width: 1024px) {
    .single-post-title {
        font-size: 42px;
    }
}

@media (max-width: 768px) {
    .single-post-header {
        margin-bottom: 40px;
    }

    .single-post-title {
        font-size: 32px;
        margin-bottom: 30px;
    }

    .featured-image-wrapper {
        border-radius: 24px;
        padding: 6px;
        margin-bottom: 40px;
    }

    .featured-image-wrapper img {
        border-radius: 20px;
    }

    .author-card {
        padding: 32px;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 24px;
    }

    .author-avatar-box img {
        width: 80px;
        height: 80px;
    }

    .author-actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .single-post-title {
        font-size: 28px;
    }

    .author-card {
        padding: 24px;
        border-radius: 24px;
    }

    .author-name {
        font-size: 20px;
    }

    .author-bio {
        font-size: 14px;
    }
}
/* Loading Animations */
@keyframes tp-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.animate-spin { animation: tp-spin 1s linear infinite; }
