/* Elegant Tab Navigation Styles */
.tab-navigation {
    display: flex;
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 8px;
    margin: 2rem 0 3rem 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    border: 1px solid rgba(226, 232, 240, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    animation: fadeInUp 0.6s ease-out;
}

.tab-navigation::-webkit-scrollbar {
    display: none;
}

.tab-navigation::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 60px;
    background: linear-gradient(to right, transparent, rgba(248, 250, 252, 0.9));
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab-navigation.can-scroll::before {
    opacity: 1;
}

.tab-button {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.875rem 1.25rem;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 48px;
    touch-action: manipulation;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
    flex-shrink: 0;
    margin: 0 2px;
    backdrop-filter: blur(5px);
}

.tab-button:hover {
    background: rgba(67, 97, 238, 0.08);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.15);
}

.tab-button.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
    transform: translateY(-2px);
}

.tab-button.active:hover {
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.5);
    transform: translateY(-2px);
}

/* Mobile-specific tab button improvements */
@media (max-width: 768px) {
    .tab-navigation {
        margin: 1rem 0 1rem 0;
        padding: 6px;
        border-radius: 14px;
        background: rgba(248, 250, 252, 0.9);
    }
    
    .tab-button {
        padding: 0.75rem 1rem; /* Compact but touch-friendly */
        font-size: 0.875rem;
        min-height: 44px; /* Slightly smaller for mobile */
        margin: 0 1px;
        border-radius: 10px;
    }
    
    .tab-button:active {
        transform: scale(0.97); /* Subtle touch feedback */
        background: rgba(67, 97, 238, 0.1);
    }
    
    .tab-button.active:active {
        transform: scale(0.97);
    }
    
    .tab-button i {
        font-size: 1rem; /* Optimized icon size for mobile */
    }
    
    /* Hide gradient indicator on mobile for cleaner look */
    .tab-navigation::before {
        display: none;
    }
}
    
    /* Show scroll indicator on mobile */
.tab-navigation.can-scroll::before {
    opacity: 1;
    width: 40px; /* Smaller indicator on mobile */
}

/* Add scroll progress indicator */
.tab-navigation::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    z-index: 3;
    opacity: 0;
    transition: opacity 0.3s ease, width 0.1s ease;
    width: 0;
    transform-origin: left;
}

.tab-navigation.can-scroll::after {
    opacity: 1;
}

/* Tab scroll progress animation */
@keyframes tabScrollProgress {
    from { width: 0%; }
    to { width: 100%; }
}

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

/* Elegant tab button animations */
.tab-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.tab-button:hover::before {
    left: 100%;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 1px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab-button.active::after {
    opacity: 1;
}

/* Swipe indicator for mobile */
@media (max-width: 768px) {
    .tab-content-container {
        position: relative;
        overflow: hidden;
    }
    
    .tab-content-container::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 10px;
        width: 30px;
        height: 30px;
        background: rgba(67, 97, 238, 0.2);
        border-radius: 50%;
        transform: translateY(-50%);
        opacity: 0;
        transition: opacity 0.3s ease;
        z-index: 100;
        pointer-events: none;
    }
    
    .tab-content-container::after {
        content: '';
        position: absolute;
        top: 50%;
        right: 10px;
        width: 30px;
        height: 30px;
        background: rgba(67, 97, 238, 0.2);
        border-radius: 50%;
        transform: translateY(-50%);
        opacity: 0;
        transition: opacity 0.3s ease;
        z-index: 100;
        pointer-events: none;
    }
    
    .tab-content-container.swiping-left::before {
        opacity: 1;
        background: rgba(67, 97, 238, 0.4);
    }
    
    .tab-content-container.swiping-right::after {
        opacity: 1;
        background: rgba(67, 97, 238, 0.4);
    }
}

.tab-button:hover {
    color: var(--primary);
    background: rgba(67, 97, 238, 0.05);
    transform: translateY(-1px);
}

.tab-button:active {
    transform: translateY(0);
}

.tab-button.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
    transform: translateY(-1px);
}

.tab-button.active:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
}

.tab-button i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.tab-button.active i {
    transform: scale(1.1);
}

.tab-button span {
    font-weight: 500;
    white-space: nowrap;
}

.tab-content-container {
    position: relative;
    min-height: 400px; /* Prevent layout shift during transitions */
    touch-action: pan-y; /* Allow vertical scrolling but enable horizontal swipe */
}

/* Tab Content Styles */
.tab-content {
    display: block !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tab-pane {
    display: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tab-pane.active {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Fix for Bootstrap tabs compatibility */
.tab-content .tab-pane {
    display: none;
}

.tab-content .tab-pane.active {
    display: block;
}

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

/* Mobile-first responsive design */
@media (max-width: 768px) {
    .tab-switch-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0 0.5rem;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
        position: relative;
        width: 100%;
        margin: 0.5rem 0 1.5rem;
        z-index: 10; /* Ensure tabs stay above content */
        background: white; /* Add background to prevent transparency issues */
        border-radius: 12px; /* Add rounded corners */
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Add subtle shadow */
    }
    
    .tab-switch-container::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    .tab-switch-container::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 30px;
        background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.8));
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .tab-switch-container.can-scroll::after {
        opacity: 1;
    }
    
    .tab-switch-container.can-scroll {
        padding-right: 2rem;
    }
    
    .tab-switch-buttons {
        display: flex;
        flex-direction: row;
        width: max-content;
        min-width: 100%;
        max-width: none;
        border-radius: 50px;
        gap: 0.25rem;
        flex-wrap: nowrap !important;
        justify-content: flex-start;
        padding: 0.5rem;
        cursor: grab;
        cursor: -webkit-grab;
        user-select: none;
        -webkit-user-select: none;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
        scroll-behavior: smooth;
        transition: transform 0.1s ease-out;
        position: relative; /* Ensure proper stacking context */
    }
    
    .tab-switch-buttons:active {
        cursor: grabbing;
        cursor: -webkit-grabbing;
    }
    
    .tab-button {
        width: auto;
        justify-content: center;
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        border-radius: 40px;
        flex: 0 0 auto;
        min-width: 110px;
        max-width: 140px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        position: relative; /* Ensure proper stacking */
        z-index: 1; /* Ensure buttons are clickable */
    }
    
    .tab-switch-container {
        margin: 0.25rem 0 1.5rem;
    }
    
    .tab-content-container {
        min-height: 350px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .tab-switch-buttons {
        gap: 0.5rem;
    }
    
    .tab-button {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
}

@media (min-width: 1025px) {
    .tab-switch-buttons {
        gap: 0.75rem;
    }
    
    .tab-button {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    .tab-button:hover {
        transform: translateY(-2px);
    }
    
    .tab-button.active {
        transform: translateY(-2px);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .tab-button {
        border: 2px solid transparent;
    }
    
    .tab-button.active {
        border-color: white;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .tab-button,
    .tab-content {
        transition: none;
    }
    
    .tab-content.active {
        animation: none;
    }
}

/* Features Section */
.features-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(224, 195, 252, 0.2) 100%);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(224, 195, 252, 0.3);
    height: 85%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    border-color: rgba(114, 9, 183, 0.15);
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1), rgba(114, 9, 183, 0.1));
    border-radius: 50%;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: #7209b7;
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: #333;
}

.feature-card p {
    color: #666;
    margin-bottom: 1.25rem;
    line-height: 1.4;
    font-size: 0.9rem;
}

.feature-link {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(90deg, #7209b7, #4361ee 80%);
    color: #fff;
    border: none;
    border-radius: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    margin-top: auto;
}

.feature-link:hover {
    background: linear-gradient(90deg, #4361ee, #7209b7 80%);
    opacity: 0.95;
}

/* Subjects Section */
.subjects-section {
    padding: 4rem 0;
    background-color: var(--bg-light);
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.subject-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 250, 250, 0.98) 100%);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 
        0 2px 16px rgba(0, 0, 0, 0.08),
        0 1px 2px rgba(0, 0, 0, 0.04),
        inset 0 0 0 0.5px rgba(255, 255, 255, 0.8);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.subject-card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.12),
        0 4px 8px rgba(0, 0, 0, 0.06),
        inset 0 0 0 0.5px rgba(255, 255, 255, 0.8);
}

.subject-icon-container {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.2rem;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.08),
        inset 0 0 0 0.5px rgba(255, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
}

.subject-icon-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.subject-card:hover .subject-icon-container::before {
    opacity: 1;
    transform: rotate(45deg) translate(50%, 50%);
}

.subject-card:hover .subject-icon-container {
    transform: scale(1.05) rotate(-3deg);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.12),
        inset 0 0 0 0.5px rgba(255, 255, 255, 0.8);
}

.subject-icon {
    font-size: 2.2rem;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    line-height: 1;
}

.subject-card h3 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    z-index: 2;
    transition: all 0.3s ease;
}

.subject-card p {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    z-index: 2;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    line-height: 1.4;
}

.subject-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #4361ee 0%, #7209b7 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 10;
    pointer-events: none;
}

.subject-hover p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    font-size: 0.85rem;
    line-height: 1.3;
}

.subject-card:hover .subject-hover {
    opacity: 0.95;
    transform: translateY(0);
    pointer-events: auto;
}

.subject-card:hover .subject-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
}

.btn-outline {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: transparent;
    border: 1px solid #fff;
    border-radius: 0.5rem;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-outline:hover {
    background-color: #fff;
    color: #7209b7;
    transform: translateY(-2px);
}

/* Animation for cards appearing */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subject-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.subject-card:nth-child(1) { animation-delay: 0.1s; }
.subject-card:nth-child(2) { animation-delay: 0.2s; }
.subject-card:nth-child(3) { animation-delay: 0.3s; }
.subject-card:nth-child(4) { animation-delay: 0.4s; }
.subject-card:nth-child(5) { animation-delay: 0.5s; }
.subject-card:nth-child(6) { animation-delay: 0.6s; }
.subject-card:nth-child(7) { animation-delay: 0.7s; }
.subject-card:nth-child(8) { animation-delay: 0.8s; }

/* Testimonials */
.testimonials-section {
    background-color: var(--bg-light);
    padding: var(--spacing-xxl) 0;
}

.testimonials-slider {
    display: flex;
    gap: var(--spacing-xl);
    overflow: hidden;
}

.testimonial-card {
    background-color: var(--bg-color);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-sm);
    flex: 1;
    min-width: 300px;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    font-size: 5rem;
    line-height: 1;
    font-family: Georgia, serif;
    color: rgba(67, 97, 238, 0.1);
    z-index: 0;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.testimonial-content {
    margin-bottom: var(--spacing-lg);
    position: relative;
    z-index: 1;
    flex-grow: 1;
}

.testimonial-content p {
    font-style: italic;
    margin-bottom: 0;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.testimonial-author img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-author h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.testimonial-author p {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0;
}

.slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: var(--spacing-xl);
    gap: var(--spacing-xl);
}

.prev-btn, .next-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: var(--border-width) solid var(--bg-dark);
    background-color: var(--bg-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.prev-btn:hover, .next-btn:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.prev-btn::before, .next-btn::before {
    content: '';
    width: 10px;
    height: 10px;
    border-top: 2px solid var(--text-light);
    border-right: 2px solid var(--text-light);
    transition: all var(--transition-fast);
}

.prev-btn::before {
    transform: rotate(-135deg);
}

.next-btn::before {
    transform: rotate(45deg);
}

.prev-btn:hover::before, .next-btn:hover::before {
    border-color: var(--bg-color);
}

.slider-dots {
    display: flex;
    gap: var(--spacing-sm);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--bg-dark);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.dot.active {
    background-color: var(--primary-color);
    transform: scale(1.2);
}

/* Call to Action */
.cta-section {
    padding: var(--spacing-xxl) 0;
}

.cta-card {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xxl) var(--spacing-xl);
    color: white;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.cta-card h2 {
    color: white;
    margin-bottom: var(--spacing-md);
    font-size: 2rem;
}

.cta-card p {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-xl);
    opacity: 0.9;
}

.cta-card .btn-primary {
    background-color: white;
    color: var(--primary-color);
}

.cta-card .btn-primary:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

/* Form Elements */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: var(--border-width) solid var(--bg-dark);
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    outline: none;
    transition: border-color var(--transition-fast);
}

.form-control:focus {
    border-color: var(--primary-color);
}

/* AI Chat Interface */
.chat-container {
    background-color: var(--bg-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 500px;
}

.chat-header {
    padding: var(--spacing-lg);
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.chat-header h3 {
    margin-bottom: 0;
    color: white;
}

.chat-messages {
    flex-grow: 1;
    padding: var(--spacing-lg);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.message {
    max-width: 80%;
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
    word-break: break-word;
}

.message-user {
    align-self: flex-end;
    background-color: var(--primary-light);
    color: white;
    border-bottom-right-radius: 0;
}

.message-ai {
    align-self: flex-start;
    background-color: var(--bg-light);
    color: var(--text-color);
    border-bottom-left-radius: 0;
}

.chat-input {
    padding: var(--spacing-md);
    border-top: var(--border-width) solid var(--bg-dark);
    display: flex;
    gap: var(--spacing-md);
}

.chat-input input {
    flex-grow: 1;
    padding: 0.75rem 1rem;
    border: var(--border-width) solid var(--bg-dark);
    border-radius: var(--border-radius-md);
    outline: none;
}

.chat-input button {
    padding: 0.75rem 1.5rem;
}

/* Quiz Card */
.quiz-card {
    background-color: var(--bg-color);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-xl);
}

.quiz-question {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: var(--spacing-lg);
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.quiz-option {
    padding: var(--spacing-md);
    border: var(--border-width) solid var(--bg-dark);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quiz-option:hover {
    background-color: var(--bg-light);
    border-color: var(--primary-light);
}

.quiz-option.selected {
    background-color: var(--primary-light);
    color: white;
    border-color: var(--primary-light);
}

.quiz-option.correct {
    background-color: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.quiz-option.incorrect {
    background-color: var(--error-color);
    color: white;
    border-color: var(--error-color);
}

.quiz-feedback {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
    font-weight: 500;
}

.quiz-feedback.correct {
    background-color: rgba(56, 176, 0, 0.1);
    color: var(--success-color);
}

.quiz-feedback.incorrect {
    background-color: rgba(217, 4, 41, 0.1);
    color: var(--error-color);
}

/* Vocabulary Card */
.vocab-card {
    perspective: 1000px;
    height: 200px;
    margin-bottom: var(--spacing-lg);
}

.vocab-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.vocab-card.flipped .vocab-card-inner {
    transform: rotateY(180deg);
}

.vocab-card-front, .vocab-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-md);
}

.vocab-card-front {
    background-color: var(--primary-color);
    color: white;
}

.vocab-card-back {
    background-color: var(--bg-color);
    color: var(--text-color);
    transform: rotateY(180deg);
}

.vocab-word {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

.vocab-definition {
    text-align: center;
}

.vocab-controls {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

/* Poetry Display */
.poem-container {
    background-color: var(--bg-color);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-md);
    max-width: 800px;
    margin: 0 auto;
}

.poem-title {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-sm);
    text-align: center;
}

.poem-author {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: var(--spacing-lg);
    text-align: center;
    font-style: italic;
}

.poem-content {
    font-family: 'Georgia', serif;
    line-height: 1.8;
    white-space: pre-line;
    margin-bottom: var(--spacing-xl);
}

.poem-line {
    margin-bottom: 0.5rem;
}

.poem-stanza {
    margin-bottom: var(--spacing-lg);
}

.poem-analysis {
    background-color: var(--bg-light);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-md);
    margin-top: var(--spacing-xl);
    border-left: 4px solid var(--primary-color);
}

.poem-analysis h4 {
    margin-bottom: var(--spacing-sm);
}

/* Timeline (for History) */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--spacing-xl) 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 0 var(--spacing-xl) var(--spacing-xxl);
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-content {
    position: relative;
    padding: var(--spacing-lg);
    background-color: var(--bg-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

.timeline-item:nth-child(odd) .timeline-content::after {
    content: '';
    position: absolute;
    top: 20px;
    right: -15px;
    width: 30px;
    height: 30px;
    background-color: var(--bg-color);
    transform: rotate(45deg);
    box-shadow: var(--shadow-sm);
    z-index: -1;
}

.timeline-item:nth-child(even) .timeline-content::after {
    content: '';
    position: absolute;
    top: 20px;
    left: -15px;
    width: 30px;
    height: 30px;
    background-color: var(--bg-color);
    transform: rotate(45deg);
    box-shadow: var(--shadow-sm);
    z-index: -1;
}

.timeline-date {
    position: absolute;
    top: 20px;
    width: 120px;
    padding: var(--spacing-sm) var(--spacing-md);
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: var(--border-radius-md);
    text-align: center;
    font-weight: 600;
    box-shadow: var(--shadow-md);
}

.timeline-item:nth-child(odd) .timeline-date {
    right: -150px;
}

.timeline-item:nth-child(even) .timeline-date {
    left: -150px;
}

.timeline-title {
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

.timeline-description {
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
}

.timeline-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius-md);
    margin-bottom: var(--spacing-md);
}

.timeline-dot {
    position: absolute;
    top: 20px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--accent-color);
    border: 4px solid var(--bg-color);
    box-shadow: var(--shadow-sm);
    z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -10px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
}

/* Educational Profile Styles */
.profile-section {
    display: flex;
    align-items: center;
    margin-left: 1rem;
}

.profile-button {
    display: flex;
    align-items: center;
    background: var(--primary-color);
    border: none;
    border-radius: var(--border-radius-md);
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-button:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.profile-button svg {
    margin-right: 0.5rem;
    width: 16px;
    height: 16px;
}

.profile-display {
    font-size: 0.875rem;
    background: var(--bg-light);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-md);
    margin-left: 0.5rem;
    border: 1px solid var(--bg-dark);
    display: none;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--bg-dark);
}

.modal-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.close-button {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.3s;
}

.close-button:hover {
    color: var(--text-color);
}

.modal-body {
    padding: 1.5rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* About Section */
.about-section {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.about-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.about-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    height: 100%;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.about-card:hover::before {
    opacity: 0.05;
}

.about-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.about-card-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.about-card-icon i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.about-card h4 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin: 0;
}

.about-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.about-card li {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

/* Media Queries for About Section */
@media (max-width: 992px) {
    .about-cards {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .about-section {
        padding: 50px 0;
    }
    
    .about-cards {
        margin-top: 30px;
    }
    
    .about-card h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .about-cards {
        grid-template-columns: 1fr;
    }
    
    .about-card {
        padding: var(--spacing-lg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .subjects-grid {
        grid-template-columns: 1fr;
    }
    
    .subject-card {
        height: auto;
        min-height: 250px;
    }
    
    .subject-icon {
        width: 60px;
        height: 60px;
    }
    
    .subject-icon i {
        font-size: 1.5rem;
    }
    
    .subject-card h3 {
        font-size: 1.3rem;
    }
}