/* Custom Purple Theme for PrepMyCert */
:root {
    --primary-color: #6f42c1;
    --primary-dark: #5a2d8c;
    --primary-light: #8b5cf6;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

/* Override Bootstrap Primary Color */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.hero-graphic {
    transition: transform 0.3s ease;
}

.hero-graphic:hover {
    transform: translateY(-5px);
}

.hero-accent .badge {
    animation: fadeInUp 0.8s ease-out;
    animation-fill-mode: both;
}

.hero-accent .badge:nth-child(1) {
    animation-delay: 0.2s;
}

.hero-accent .badge:nth-child(2) {
    animation-delay: 0.4s;
}

.hero-accent .badge:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-section {
    display: flex;
    align-items: center;
}

.min-vh-75 {
    min-height: 75vh;
}

.text-white-75 {
    color: rgba(255, 255, 255, 0.75);
}

.btn-outline-white {
    color: white;
    border-color: white;
}

.btn-outline-white:hover {
    background-color: white;
    border-color: white;
    color: var(--primary-color);
}

/* Feature Cards */
.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Package Cards */
.package-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: 100%;
}

.package-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.package-card-small {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.package-card-small:hover {
    transform: translateY(-3px);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.15);
}

.package-domain {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: var(--primary-light);
    color: white;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.package-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--success-color);
}

.package-price-large {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--success-color);
}

.package-stats {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

/* Test Taking Interface */
.test-card {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: none;
}

.question-slide {
    min-height: 400px;
}

.question-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--dark-color);
    margin-bottom: 1rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.question-domain {
    margin-bottom: 1rem;
}

.answer-option {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 2px solid #dee2e6;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.answer-option:hover {
    border-color: var(--primary-light);
    background-color: rgba(111, 66, 193, 0.05);
}

.answer-option .form-check-input:checked + .form-check-label {
    color: var(--primary-color);
    font-weight: 500;
}

.answer-option .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.question-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.question-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 500;
}

.legend {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* Test Results */
.result-stat {
    margin-bottom: 1.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.question-review {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin-bottom: 2rem;
}

.question-header {
    margin-bottom: 1rem;
}

.answer-section {
    padding: 1rem;
    border-radius: 0.5rem;
    background-color: var(--light-color);
}

.answer-text {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.explanation {
    font-size: 0.9rem;
    font-style: italic;
}

.overall-explanation {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    border-left: 4px solid var(--info-color);
}

/* Dashboard */
.text-lg {
    font-size: 1.5rem;
}

.text-white-75 {
    color: rgba(255, 255, 255, 0.75);
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.5);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 1rem;
    margin-top: 3rem;
}

/* Stats Cards */
.summary-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-item {
    display: flex;
    justify-content: between;
    align-items: center;
    padding: 0.75rem;
    background-color: var(--light-color);
    border-radius: 0.5rem;
}

.stat-value {
    font-weight: 500;
    color: var(--dark-color);
}

/* Feature Items */
.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.feature-item i {
    margin-top: 0.25rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 50vh;
        text-align: center;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .package-price-large {
        font-size: 2rem;
    }
    
    .question-grid {
        grid-template-columns: repeat(auto-fill, minmax(35px, 1fr));
    }
    
    .question-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
}

/* Sticky Elements */
.sticky-top {
    position: sticky;
    top: 1rem;
    z-index: 1020;
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Question Image Styles */
.question-image-container {
    text-align: center;
    margin: 20px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.question-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border: 2px solid #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.question-image:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Responsive image sizes */
@media (max-width: 768px) {
    .question-image-container {
        padding: 5px;
        margin: 15px 0;
    }
    
    .question-image {
        max-width: 100%;
        border-radius: 3px;
    }
}

/* Question text with images */
.question-text {
    line-height: 1.6;
}

.question-text .question-image-container {
    margin: 15px auto;
}

/* Answer option text with images */
.form-check-label .question-image-container {
    margin: 10px 0;
    display: inline-block;
    width: 100%;
}

.form-check-label .question-image {
    max-width: 200px;
    max-height: 150px;
    object-fit: contain;
}

/* Promotional Banner Fixes */
.promo-banner {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%) !important;
}

.promo-banner * {
    color: white !important;
}

.promo-banner .badge {
    background-color: rgba(255, 255, 255, 0.9) !important;
    color: #ee5a24 !important;
    font-weight: bold !important;
}

.promo-banner .text-warning {
    color: #fff3cd !important;
}

.promo-banner .btn-close-white {
    filter: invert(1);
    opacity: 0.8;
}

.promo-banner .btn-close-white:hover {
    opacity: 1;
}

/* Hero Stats Section Fixes */
.social-proof .stat-label {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    opacity: 1 !important;
}

.social-proof .stat-number {
    color: white !important;
    font-weight: 800 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Improve overall text contrast on gradient backgrounds */
.hero-section .text-white {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hero-section .opacity-75 {
    opacity: 0.95 !important;
}

/* Enhanced contrast for better readability */
.social-proof {
    background: rgba(0, 0, 0, 0.15);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

/* Fix any remaining text visibility issues */
.hero-section .stat-label.opacity-75 {
    opacity: 1 !important;
    color: rgba(255, 255, 255, 0.95) !important;
}
