/* Questions Bank Page Styles */

/* Import CSS variables if not already available */
:root {
    --pilotus-dark: #12313d;
    --pilotus-musturd: #d9a936;
    --pilotus-musturd-light: #d7a01c;
}

/* Ensure proper layout containment */
.test-category-section,
.feature-cards-section,
.free-mock-test-banner {
    box-sizing: border-box;
    width: 100%;
}

/* Questions bank modals: website color schema (pilotus mustard) */
#loginRequiredModal .modal-footer .btn-primary,
#subscriptionRequiredModal .modal-footer .btn-primary,
#paidTestRequiredModal .modal-footer .btn-primary {
    background-color: var(--pilotus-musturd);
    border-color: var(--pilotus-musturd);
    color: #fff;
}
#loginRequiredModal .modal-footer .btn-primary:hover,
#subscriptionRequiredModal .modal-footer .btn-primary:hover,
#paidTestRequiredModal .modal-footer .btn-primary:hover {
    background-color: var(--pilotus-musturd-light);
    border-color: var(--pilotus-musturd-light);
    color: #fff;
}
#paidTestRequiredModal .modal-footer .btn-outline-primary {
    border-color: var(--pilotus-musturd);
    color: var(--pilotus-musturd);
}
#paidTestRequiredModal .modal-footer .btn-outline-primary:hover {
    background-color: var(--pilotus-musturd);
    border-color: var(--pilotus-musturd);
    color: #fff;
}
#loginRequiredModal .modal-footer .btn-outline-secondary,
#subscriptionRequiredModal .modal-footer .btn-outline-secondary,
#paidTestRequiredModal .modal-footer .btn-outline-secondary {
    border-color: var(--pilotus-musturd);
    color: var(--pilotus-musturd);
}
#loginRequiredModal .modal-footer .btn-outline-secondary:hover,
#subscriptionRequiredModal .modal-footer .btn-outline-secondary:hover,
#paidTestRequiredModal .modal-footer .btn-outline-secondary:hover {
    background-color: var(--pilotus-musturd);
    border-color: var(--pilotus-musturd);
    color: #fff;
}

/* Hero Section */
.questions-bank-hero {
    padding: 0;
    color: #fff;
    position: relative;
    overflow: hidden;
    min-height: 320px;
    display: flex;
    align-items: flex-end;
}

.hero-background-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('https://images.unsplash.com/photo-1436491865332-7a61a109cc05?ixlib=rb-4.0.3&auto=format&fit=crop&w=2000&q=80');
    background-size: cover;
    background-position: center;
    filter: blur(3px);
    transform: scale(1.1);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 77, 110, 0.85) 0%, rgba(88, 28, 135, 0.85) 100%);
    z-index: 1;
}

.questions-bank-hero .container {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: flex-end;
    min-height: 320px;
    padding: 60px 12px 20px;
}

.questions-bank-hero .row {
    width: 100%;
    margin: 0;
}

.questions-bank-hero .col-12 {
    padding: 0;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hero-content-bottom {
    padding-bottom: 0;
}

.hero-content-center {
    text-align: center;
    align-items: center;
}

.hero-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 4px;
}

.hero-icon-wrapper {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #fff;
}

.hero-icon-wrapper i {
    stroke-width: 1.5;
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 700;
    margin: 0;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.hero-title-icon {
    margin-right: 10px;
    vertical-align: middle;
    font-size: 1em;
}

.hero-description {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    max-width: 700px;
}

.hero-content-center .hero-description {
    margin-left: auto;
    margin-right: auto;
}


/* Free Mock Test Banner */
.free-mock-test-banner {
    padding: 24px 0;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.banner-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.banner-text {
    flex: 1;
}

.banner-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: #fff;
}

.banner-description {
    font-size: 1rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.5;
}

.banner-description strong {
    font-size: 1.125rem;
    font-weight: 700;
}

/* Test Category Section */
.test-category-section {
    padding: 40px 0;
    background: #f0f2f5;
    width: 100%;
    overflow-x: hidden;
}

/* Use standard Bootstrap container - no override needed */

.categories-container {
    width: 100%;
    display: block;
    overflow-x: auto;
    margin: 0;
    padding: 0;
}

.section-header {
    text-align: left;
    margin-bottom: 20px;
    padding-left: 0;
    padding-right: 0;
}

.section-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #17181a;
    margin-bottom: 12px;
    letter-spacing: -0.2px;
    line-height: 1.3;
}

.section-description {
    font-size: 1rem;
    color: #667085;
    margin: 0;
    line-height: 1.5;
}

/* Category List - flex + flex-wrap: wrap (left to right, wrap when space runs out, like float) */
.test-category-section .category-list {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
    width: 100% !important;
}

/* Category block: min-width so they sit side by side and wrap; card grows to show full text on one line */
.test-category-section .category-block {
    background: #fff !important;
    border-radius: 12px !important;
    padding: 16px 20px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.2s ease !important;
    border: 1px solid #e5e7eb !important;
    min-width: 320px !important;
    width: fit-content !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.test-category-section .category-block:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
}

.test-category-section .category-block-clickable {
    cursor: pointer !important;
}

.test-category-section .category-block.category-block-clickable:hover {
    cursor: pointer !important;
}

.test-category-section .category-block-icon {
    width: auto !important;
    min-width: 3rem !important;
    height: 3rem !important;
    aspect-ratio: 1 !important;
    border-radius: 10px !important;
    background: var(--pilotus-musturd) !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.test-category-section .category-block-icon i {
    font-size: 1.5rem !important;
}

.test-category-section .category-block-body {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: 100%;
}

.test-category-section .category-block-title {
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    color: #17181a !important;
    margin: 0 0 2px 0 !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    word-break: normal !important;
}

.test-category-section .category-block-under {
    font-size: 0.875rem !important;
    color: #17181a !important;
    margin: 0 !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    word-break: normal !important;
}

/* Free: 1 Test badge - separate styled pill (mustard tint); extra space from category text */
.test-category-section .category-block-badge {
    display: inline-flex !important;
    align-items: center !important;
    background: var(--pilotus-musturd) !important;
    color: #fff !important;
    border: none !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    flex-shrink: 0 !important;
    margin-left: 40px !important;
}

.test-category-section .category-block-badge i {
    display: none !important;
}

.test-category-section .category-block-arrow {
    color: #667085 !important;
    font-size: 1.25rem !important;
    display: flex !important;
    align-items: center !important;
    margin-left: 40px !important;
}

.test-category-section .category-block:hover .category-block-arrow {
    color: #17181a !important;
}

/* Test Category Cards (for mock tests) */
.test-category-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.test-category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
}


.card-header-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 16px;
}

.card-icon-container {
    width: 56px;
    height: 56px;
    background: var(--pilotus-musturd);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-icon-container i {
    font-size: 28px;
    color: #fff;
}

.card-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: right;
    flex: 1;
    align-items: flex-end;
}

.test-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    white-space: nowrap;
}

.test-status-badge.status-free {
    background: #10b981;
    color: #fff;
    border: none;
    position: absolute;
    top: 0;
    right: 0;
    border-radius: 0px 17px 0px 17px;
}

.test-status-badge.status-paid {
    background: #f59e0b;
    color: #fff;
    border: none;
    position: absolute;
    top: 0;
    right: 0;
    border-radius: 0px 17px 0px 17px;
}

.test-status-badge i {
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
}

.test-status-badge.status-free i {
    color: #fff;
}

.test-status-badge.status-paid i {
    color: #fff;
}

.test-status-badge span {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
}

.test-meta-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
    margin-top: 0;
}

.meta-text {
    font-size: 0.875rem;
    color: #667085;
    font-weight: 500;
    line-height: 1.5;
}

.meta-item {
    font-size: 0.875rem;
    color: #667085;
    font-weight: 500;
    line-height: 1.5;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #17181a;
    margin-bottom: 12px;
    line-height: 1.4;
}

.card-description {
    font-size: 0.9375rem;
    color: #667085;
    line-height: 1.6;
    margin-bottom: 28px;
    flex-grow: 1;
}

.btn-start-test {
    display: inline-block;
    padding: 11px 24px;
    background: var(--pilotus-musturd);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    width: 100%;
    border: none;
    cursor: pointer;
    font-size: 0.9375rem;
    margin-top: auto;
    line-height: 1.5;
}

.btn-start-test:hover {
    background: var(--pilotus-musturd-light);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(217, 169, 54, 0.35);
}

/* Mock Test Card Styles */
.mock-test-card {
    position: relative;
}

.mock-test-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    flex-grow: 1;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9375rem;
    color: #667085;
}

.detail-item i {
    color: var(--pilotus-musturd);
    font-size: 1rem;
}

/* Shared Box Card Design */
.shared-box-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.shared-box-card .card-header-info {
    margin-bottom: 16px;
}

.shared-box-card .mock-test-details {
    margin-bottom: 20px;
    flex-grow: 1;
}

.shared-box-card .btn-start-test {
    margin-top: auto;
}

.badge-free,
.badge-paid {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-free {
    background: #10b981;
    color: #fff;
}

.badge-paid {
    background: #f59e0b;
    color: #fff;
}

/* Breadcrumb Navigation - All Categories > First Test (no background, all links clickable, pointer cursor) */
.breadcrumb-container {
    margin-bottom: 16px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.breadcrumb-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    font-size: 1.0625rem;
}

.breadcrumb-sep {
    display: inline-flex;
    align-items: center;
    color: #9ca3af;
    font-weight: 500;
    margin: 0 2px;
}

.breadcrumb-sep i {
    font-size: 0.75em;
    opacity: 0.9;
}

.breadcrumb-link,
.breadcrumb-link-all {
    color: #4a90e2;
    text-decoration: none;
    font-weight: 500;
    background: none;
    transition: color 0.3s ease;
    cursor: pointer;
}

.breadcrumb-link:hover,
.breadcrumb-link-all:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* Current category at end of breadcrumb: plain text, not linkable */
.breadcrumb-current {
    color: #17181a;
    font-weight: 500;
    cursor: default;
}

/* Loading Container */
.loading-container {
    padding: 60px 20px;
}

.loading-container p {
    color: #667085;
    font-size: 1rem;
    margin-top: 16px;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state-icon {
    font-size: 64px;
    color: #cbd5e1;
    margin-bottom: 24px;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #17181a;
    margin-bottom: 12px;
}

.empty-state-description {
    font-size: 1rem;
    color: #667085;
    margin: 0;
}

/* Feature Cards Section */
.feature-cards-section {
    padding: 0 0 80px;
    background: #f0f2f5;
}

.feature-card {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
}

.feature-icon-wrapper {
    flex-shrink: 0;
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
}

.feature-icon-green {
    background: #10b981;
}

.feature-icon-purple {
    background: #8b5cf6;
}

.feature-icon-orange {
    background: #f59e0b;
}

.feature-content {
    flex: 1;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #17181a;
    margin-bottom: 8px;
    line-height: 1.3;
}

.feature-description {
    font-size: 0.9375rem;
    color: #667085;
    line-height: 1.6;
    margin: 0;
}

/* Mock Tests Container */
.mock-tests-container {
    margin-top: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .banner-content {
        flex-direction: column;
        text-align: center;
    }
    
    .banner-icon {
        margin: 0 auto;
    }
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-icon-wrapper {
        width: 48px;
        height: 48px;
        font-size: 32px;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-description {
        font-size: 0.9375rem;
    }
    
    .questions-bank-hero {
        min-height: 280px;
    }
    
    .questions-bank-hero .container {
        padding: 50px 12px 30px;
        min-height: 280px;
    }
    
    .btn-view-auth {
        margin-top: 20px;
        width: 100%;
        text-align: center;
    }
    
    .hero-title-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .hero-content-center .hero-title-wrapper {
        align-items: center;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 0.9375rem;
    }
    
    .hero-icon-wrapper {
        width: 44px;
        height: 44px;
        font-size: 28px;
    }
    
    .section-title {
        font-size: 1.625rem;
    }
    
    .section-description {
        font-size: 0.9375rem;
    }
    
    /* Center category section header on mobile only */
    .section-header-centered,
    .test-category-section .section-header-centered {
        text-align: center;
    }
    
    .section-header-centered .section-description {
        justify-content: center;
    }
    
    .test-category-card {
        padding: 28px;
    }
    
    .card-title {
        font-size: 1.125rem;
    }
    
    .card-icon-container {
        width: 52px;
        height: 52px;
    }
    
    .card-icon-container i {
        font-size: 26px;
    }
    
    .test-category-section .category-block {
        padding: 14px 16px !important;
        gap: 12px !important;
    }
    
    .test-category-section .category-block-icon {
        min-width: 2.625rem !important;
        height: 2.625rem !important;
    }
    
    .test-category-section .category-block-icon i {
        font-size: 1.375rem !important;
    }
    
    .test-category-section .category-block-title {
        font-size: 1rem !important;
    }
    
    .test-category-section .category-block-badge {
        font-size: 0.8125rem !important;
        padding: 5px 12px !important;
    }
    
    .test-category-section .category-block-arrow {
        font-size: 1.125rem !important;
    }
    
    .questions-bank-hero {
        min-height: 240px;
    }
    
    .questions-bank-hero .container {
        padding: 40px 12px 30px;
        min-height: 240px;
    }
    
    .test-category-section {
        padding: 30px 0;
    }
    
    .section-header {
        margin-bottom: 16px;
    }
    
    .feature-cards-section {
        padding: 0 0 60px;
    }
    
    .hero-icon-wrapper {
        width: 56px;
        height: 56px;
        font-size: 36px;
    }
    
    .section-header {
        text-align: center;
    }
    
    .feature-card {
        flex-direction: column;
        text-align: center;
    }
    
    .feature-icon-wrapper {
        margin: 0 auto;
    }
    
    .banner-title {
        font-size: 1.125rem;
    }
    
    .banner-description {
        font-size: 0.9375rem;
    }
    
    .banner-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
    
    .breadcrumb-container {
        padding: 0;
    }
    
    .breadcrumb-inner {
        font-size: 1rem;
    }
    
    .mock-test-details {
        gap: 10px;
    }
    
    .detail-item {
        font-size: 0.875rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-icon-wrapper {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .card-icon-container {
        width: 48px;
        height: 48px;
    }
    
    .card-icon-container i {
        font-size: 24px;
    }
    
    .test-category-section .category-block {
        padding: 12px 14px !important;
        gap: 10px !important;
    }
    
    .test-category-section .category-block-icon {
        min-width: 2.5rem !important;
        height: 2.5rem !important;
    }
    
    .test-category-section .category-block-icon i {
        font-size: 1.25rem !important;
    }
    
    .test-category-section .category-block-title {
        font-size: 0.9375rem !important;
    }
    
    .test-category-section .category-block-under {
        font-size: 0.8125rem !important;
    }
    
    .test-category-section .category-block-badge {
        font-size: 0.75rem !important;
        padding: 4px 10px !important;
    }
    
    .test-category-section .category-block-arrow {
        font-size: 1rem !important;
    }
    
    .section-title {
        font-size: 1.625rem;
    }
    
    .feature-cards-section {
        padding: 0 0 60px;
    }
    
    .feature-card {
        padding: 24px;
    }
    
    .feature-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
    
    .feature-title {
        font-size: 1.125rem;
    }
    
    .feature-description {
        font-size: 0.875rem;
    }
    
    .free-mock-test-banner {
        padding: 20px 0;
    }
    
    .banner-icon {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }
    
    .banner-title {
        font-size: 1rem;
    }
    
    .banner-description {
        font-size: 0.875rem;
    }
    
    .banner-description strong {
        font-size: 1rem;
    }
    
    .empty-state-icon {
        font-size: 48px;
    }
    
    .empty-state-title {
        font-size: 1.25rem;
    }
    
    .empty-state-description {
        font-size: 0.9375rem;
    }
}
