/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    transition: all 0.3s ease;
    background: transparent;
}

.navbar.scrolled {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .nav-container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .nav-container {
        padding: 0 2rem;
    }
}

.nav-logo .logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.navbar.scrolled .logo-text {
    color: #1f2937;
}

.desktop-nav {
    display: none;
}

@media (min-width: 768px) {
    .desktop-nav {
        display: flex;
        gap: 2rem;
    }
}

.nav-link {
    color: #f3f4f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
}

.nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.navbar.scrolled .nav-link {
    color: #6b7280;
}

.navbar.scrolled .nav-link:hover {
    color: #1f2937;
}

.mobile-menu-btn {
    display: block;
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }
}

.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: white;
}

.navbar.scrolled .menu-toggle {
    color: #6b7280;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    margin: 4px 0;
    transition: 0.3s ease;
}

.menu-toggle.active .hamburger:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active .hamburger:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .hamburger:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-nav {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: black;
}

.mobile-nav.active {
    max-height: 200px;
}

.mobile-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: #e5e7eb;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.mobile-nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.navbar.scrolled .mobile-nav {
    background: white;
}

.navbar.scrolled .mobile-nav-link {
    color: #6b7280;
}

.navbar.scrolled .mobile-nav-link:hover {
    color: #1f2937;
    background: #f9fafb;
}

/* Hero Section */
.hero-section {
    position: relative;
    width: 100%;
    height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 80vh;
}

@media (min-width: 640px) {
    .hero-section {
        height: 60vh;
    }
}

@media (min-width: 768px) {
    .hero-section {
        height: 500px;
    }
}

@media (min-width: 1024px) {
    .hero-section {
        height: 550px;
    }
}

@media (min-width: 1280px) {
    .hero-section {
        height: 600px;
    }
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    max-width: 64rem;
}

.hero-content .banner-subtitle {
    text-align: center;
    margin-left: 0;
    margin-right: 0;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.banner-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.video-background {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-video,
.hero-fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    filter: grayscale(100%);
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 1);
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    text-align: center;
    z-index: 10;
    padding-top: 5rem;
    isolation: isolate;
}

.banner-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("images/bg-img.png") no-repeat center/cover;
    opacity: 0.4;
    z-index: -1; 
}

@media (min-width: 640px) {
    .banner-overlay {
        padding-top: 6rem;
    }
}

@media (min-width: 768px) {
    .banner-overlay {
        padding-top: 8rem;
    }
}

.banner-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .banner-title {
        font-size: clamp(2.5rem, 5vw, 4rem);
        margin-bottom: 1.5rem;
    }
}

.banner-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: #d1d5db;
    margin-bottom: 1.5rem;
    max-width: 90%;
    line-height: 1.5;
}

@media (min-width: 768px) {
    .banner-subtitle {
        max-width: 800px;
        margin-bottom: 2rem;
    }
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
}

.cta-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #374151;
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-height: 44px;
}

@media (min-width: 640px) {
    .cta-button {
        padding: 0.75rem 2rem;
        font-size: 1rem;
    }
}

.cta-button:hover {
    background: #4b5563;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.button-icon {
    width: 1rem;
    height: 1rem;
    transition: transform 0.3s ease;
}

@media (min-width: 640px) {
    .button-icon {
        width: 1.25rem;
        height: 1.25rem;
    }
}

.cta-button:hover .button-icon {
    transform: scale(1.1);
}

/* Features Section */
.features-section {
    padding: 3rem 0;
    background: white;
}

@media (min-width: 768px) {
    .features-section {
        padding: 4rem 0;
    }
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
}

.section-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #f3f4f6;
    color: #374151;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.section-description {
    color: #6b7280;
    font-size: 1.125rem;
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.feature-card {
    padding: 2rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background: #1f2937;
    color: white;
    border-radius: 0.5rem;
    margin: 0 auto 1rem;
    transition: transform 0.3s ease;
}

.feature-icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: #6b7280;
    line-height: 1.6;
}

/* About Section */
.about-section {
    padding: 4rem 0;
    background: #f9fafb;
}

@media (min-width: 768px) {
    .about-section {
        padding: 5rem 0;
    }
}

.about-content {
    max-width: 72rem;
    margin: 0 auto;
}

.about-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
}

.about-subtitle {
    font-size: 1.25rem;
    color: #6b7280;
    margin-bottom: 3rem;
    line-height: 1.6;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

@media (min-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

.about-card h3 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
}

.about-card p {
    color: #6b7280;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.values-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.values-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.values-list {
    list-style: none;
}

.values-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 0.75rem;
}

.check-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #6b7280;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.values-list li span {
    color: #6b7280;
    line-height: 1.6;
}

.founder-story {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.founder-story h3 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
}

.story-content p {
    color: #6b7280;
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* Contact Section */
.contact-section {
    padding: 4rem 0;
    background: white;
}

@media (min-width: 768px) {
    .contact-section {
        padding: 5rem 0;
    }
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 1024px) {
    .contact-content {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
}

.contact-info h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.contact-info > p {
    color: #6b7280;
    font-size: 1.125rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: #6b7280;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.contact-item h4 {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.contact-item p {
    color: #6b7280;
}

.contact-form-container {
    background: #f9fafb;
    border-radius: 0.75rem;
    padding: 2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: #374151;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1f2937;
    box-shadow: 0 0 0 3px rgba(31, 41, 55, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #1f2937;
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-button:hover {
    background: #374151;
    transform: translateY(-2px);
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .footer-content {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .footer-content {
        padding: 0 2rem;
    }
}

.footer-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid #374151;
}

@media (min-width: 1024px) {
    .footer-main {
        grid-template-columns: 2fr 1fr;
        gap: 2.5rem;
    }
}

.footer-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.footer-info p {
    color: #d1d5db;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: #374151;
    color: #d1d5db;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #4b5563;
    color: white;
}

.social-link svg {
    width: 1.25rem;
    height: 1.25rem;
}

.footer-links h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding-top: 2rem;
    gap: 1rem;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
    }
}

.footer-bottom p {
    color: #9ca3af;
    font-size: 0.875rem;
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-legal a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: white;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    color: white;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 400px;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: #10b981;
}

.toast.error {
    background: #ef4444;
}

.toast.info {
    background: #3b82f6;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-slide-in {
    animation: slideIn 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 640px) {
    .banner-title {
        font-size: 1.75rem;
    }
    .banner-subtitle {
        font-size: 1rem;
    }
    .section-header {
        margin-bottom: 2rem;
    }
    .features-grid {
        gap: 1rem;
    }
    .feature-card {
        padding: 1.5rem;
    }
    .about-text h2 {
        font-size: 2rem;
    }
    .contact-info h2 {
        font-size: 2rem;
    }
    .footer-main {
        gap: 2rem;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f4f6;
    border-top: 2px solid #1f2937;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
button:focus,
input:focus,
textarea:focus,
a:focus {
    outline: 2px solid #1f2937;
    outline-offset: 2px;
}

/* ============================================
   GLOSSARY SECTION & FLASHCARDS (CLEANED)
   ============================================ */

.glossary-section {
    padding: 6rem 0 4rem;
    background: #1f2937 !important;
    min-height: 100vh;
}

.glossary-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
    background: transparent;
    padding: 2rem;
    border-radius: 0.75rem;
    margin-top: 2rem;
    position: relative;
    z-index: 1000;
}

.glossary-header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .glossary-header h1 {
        font-size: 3.5rem;
    }
}

.glossary-header p {
    color: #d1d5db;
    font-size: 1.25rem;
    line-height: 1.6;
}

.glossary-content {
    max-width: 64rem;
    margin: 0 auto;
}

.glossary-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.glossary-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.glossary-item h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
    border-bottom: 2px solid #1f2937;
    padding-bottom: 0.5rem;
}

.glossary-item p {
    color: #6b7280;
    line-height: 1.7;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.glossary-item .example {
    background: #f9fafb;
    border-left: 4px solid #1f2937;
    padding: 1rem;
    border-radius: 0.375rem;
    margin-top: 1rem;
    color: #6b7280;
    line-height: 1.6;
}

.glossary-item .example strong {
    color: #1f2937;
    font-weight: 600;
}

/* Active navigation state */
.nav-link.active {
    color: #1f2937 !important;
    background: rgba(31, 41, 55, 0.1) !important;
}

.navbar.scrolled .nav-link.active {
    color: #1f2937 !important;
    background: rgba(31, 41, 55, 0.1) !important;
}

.mobile-nav-link.active {
    color: white !important;
    background: rgba(255, 255, 255, 0.2) !important;
}

.navbar.scrolled .mobile-nav-link.active {
    color: #1f2937 !important;
    background: rgba(31, 41, 55, 0.1) !important;
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .cta-button,
    .contact-form-container {
        display: none;
    }
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    .hero-section {
        height: auto;
        min-height: 200px;
    }
} 

/* ============================================
   INTERACTIVE GLOSSARY FLASHCARD STYLES
   ============================================ */

.main-content {
    margin-top: 4rem;
}

.glossary-controls {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 1rem;
}

.search-container {
    flex: 1;
    max-width: 400px;
}

.search-wrapper {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    border: 2px solid #374151;
    border-radius: 0.375rem;
    font-size: 1rem;
    color: white;
    background-color: #374151;
    transition: border-color 0.3s ease;
    min-height: 55px;
}

.search-input:focus {
    outline: none;
    border-color: #6b7280;
    background-color: #4b5563;
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

.filter-container {
    min-width: 200px;
}

.category-select {
    width: 100%;
    padding: 1rem;
    border: 2px solid #374151;
    border-radius: 0.375rem;
    font-size: 1rem;
    color: white;
    background-color: #374151;
    cursor: pointer;
    transition: border-color 0.3s ease;
    min-height: 55px;
}

.category-select:focus {
    outline: none;
    border-color: #6b7280;
    background-color: #4b5563;
}

.category-select option {
    background-color: #374151;
    color: white;
}

.study-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cta-button.secondary {
    background: transparent;
    border: 2px solid #374151;
    color: white;
}

.cta-button.secondary:hover {
    background: #374151;
    border-color: #4b5563;
}

.cta-button.outline {
    background: transparent;
    border: 2px solid #6b7280;
    color: #d1d5db;
}

.cta-button.outline:hover {
    background: #6b7280;
    color: white;
}

/* Progress Container */
.progress-container {
    margin-bottom: 2rem;
    background-color: #374151;
    padding: 1.5rem;
    border-radius: 0.75rem;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #4b5563;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    transition: width 0.3s ease;
    width: 0;
}

/* Flashcards Grid */
.flashcards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

/* FLASHCARD STYLES (CLEANED) */
.flashcard {
    min-height: 280px;
    height: auto;
    perspective: 1000px;
    cursor: pointer;
    animation: slideInUp 0.5s ease-out;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.flashcard:nth-child(even) {
    animation-delay: 0.1s;
}

.flashcard:nth-child(3n) {
    animation-delay: 0.2s;
}

.flashcard.flipping {
    pointer-events: none;
}

.flashcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s ease-in-out;
    transform-style: preserve-3d;
    will-change: transform;
    -webkit-transform-style: preserve-3d;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.flashcard.flipped .flashcard-inner {
    transform: rotateY(180deg) translateZ(0);
}

.flashcard-front,
.flashcard-back {
    position: absolute;
    width: 100%;
    min-height: 100%;
    height: auto;
    border-radius: 0.75rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid #374151;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    overflow-y: auto;
    max-height: 400px;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    word-break: break-word;
}

.flashcard-front {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    justify-content: space-between;
}

.flashcard-back {
    background: linear-gradient(135deg, #f9fafb 0%, #e5e7eb 100%);
    transform: rotateY(180deg);
    justify-content: flex-start;
    gap: 1rem;
}

.flashcard:hover .flashcard-front,
.flashcard:hover .flashcard-back {
    border-color: #6b7280;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.flashcard:not(.flipping):hover {
    transform: translateY(-5px);
}

.flashcard-term {
    color: #1f2937;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.flashcard-category {
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    background-color: #e5e7eb;
    border-radius: 20px;
    margin-top: auto;
}

.flashcard-definition {
    color: #1f2937;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    text-align: left;
    overflow-wrap: break-word;
    hyphens: auto;
}

.flashcard-example {
    color: #6b7280;
    font-size: 0.85rem;
    font-style: italic;
    line-height: 1.4;
    text-align: left;
    margin-bottom: 1rem;
    overflow-wrap: break-word;
}

/* Performance optimizations for smooth animations */
.flashcard,
.flashcard-inner,
.flashcard-front,
.flashcard-back {
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Smooth transitions */
.flashcard {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Prevent animation conflicts */
.flashcard.flipping {
    pointer-events: none;
}

/* Study Mode */
.study-mode {
    text-align: center;
    animation: fadeIn 0.5s ease-in;
}

.study-card-container {
    margin-bottom: 3rem;
}

.study-card {
    max-width: 700px;
    height: 450px;
    margin: 0 auto;
    perspective: 1000px;
    cursor: pointer;
}

.study-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.study-card.flipped .study-card-inner {
    transform: rotateY(180deg);
}

.study-card-front,
.study-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 1rem;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 3px solid #d1d5db;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    word-break: break-word;
}

.study-card-front {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.study-card-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, #f9fafb 0%, #e5e7eb 100%);
}

.study-term {
    color: #1f2937;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-align: center;
}

.study-instruction {
    color: #6b7280;
    font-size: 1.1rem;
    font-style: italic;
}

.study-definition {
    color: #1f2937;
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    text-align: center;
}

.study-example {
    color: #6b7280;
    font-size: 1rem;
    font-style: italic;
    line-height: 1.5;
    text-align: center;
    margin-bottom: 1.5rem;
}

.study-category {
    color: #6b7280;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    background-color: #e5e7eb;
    border-radius: 25px;
    border: 1px solid #d1d5db;
}

.study-controls-bottom {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.study-navigation {
    margin-top: 2rem;
}

.keyboard-shortcuts {
    margin-top: 2rem;
    padding: 1rem;
    background-color: #374151;
    border-radius: 0.5rem;
    color: #d1d5db;
    font-size: 0.9rem;
}

.keyboard-shortcuts strong {
    color: white;
}

/* Score and Gamification Elements */
.score-display {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
    padding: 1rem;
    border-radius: 0.75rem;
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.achievement-badge {
    background: #f59e0b;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin: 0.25rem;
    animation: bounce 0.5s ease-in-out;
}

@keyframes bounce {
    0%, 20%, 60%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    80% { transform: translateY(-5px); }
}

/* Responsive Design for Flashcards */
@media (max-width: 768px) {
    .glossary-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    .search-container,
    .category-select {
        max-width: none;
        width: 100%;
    }
    .flashcards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .flashcard {
        height: 250px;
    }
    .study-card {
        height: 350px;
    }
    .study-card-front,
    .study-card-back {
        padding: 2rem;
    }
    .study-term {
        font-size: 1.8rem;
    }
    .study-controls-bottom {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    .cta-button {
        width: 100%;
        max-width: 300px;
    }
    .glossary-header h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .flashcard-front,
    .flashcard-back {
        padding: 1.5rem;
    }
    .study-card-front,
    .study-card-back {
        padding: 1.5rem;
    }
    .study-term {
        font-size: 1.5rem;
    }
    .flashcard-term {
        font-size: 1.2rem;
    }
}

/* Animation enhancements */
@keyframes cardFlip {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(180deg); }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   GLOSSARY PAGE NAVBAR FIXES
   ============================================ */

.glossary-section .navbar .logo-text,
.glossary-page .navbar .logo-text,
body:has(.glossary-section) .navbar .logo-text {
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.glossary-section .navbar.scrolled .logo-text,
.glossary-page .navbar.scrolled .logo-text,
body:has(.glossary-section) .navbar.scrolled .logo-text {
    color: #1f2937 !important;
    text-shadow: none !important;
}

.glossary-section .navbar .nav-link {
    color: #f3f4f6 !important;
}

.glossary-section .navbar.scrolled .nav-link {
    color: #6b7280 !important;
}

.glossary-section .navbar .mobile-nav-link {
    color: #e5e7eb !important;
}

.glossary-section .navbar.scrolled .mobile-nav-link {
    color: #6b7280 !important;
}

body:has(.glossary-section) .navbar .menu-toggle,
.glossary-page .navbar .menu-toggle {
    color: white !important;
}

body:has(.glossary-section) .navbar.scrolled .menu-toggle,
.glossary-page .navbar.scrolled .menu-toggle {
    color: #1f2937 !important;
}

/* Home button styling */
.home-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #374151;
    color: white !important;
    text-decoration: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-right: 1rem;
}

.home-button:hover {
    background: #4b5563;
    transform: translateY(-1px);
    color: white !important;
}

/* Instagram Section Styles */
.instagram-section {
    padding: 60px 0;
    background: #fafbfc;
}

.instagram-section .section-header {
    text-align: center;
    margin-bottom: 32px;
}

.instagram-section h2 {
    font-size: 2.2rem;
    margin-bottom: 8px;
    font-family: 'Space Grotesk', sans-serif;
}

.instagram-section .section-description {
    color: #555;
    font-size: 1.1rem;
    margin-bottom: 0;
}

.instagram-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    justify-items: center;
}

.instagram-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.instagram-card iframe {
    width: 100%;
    height: 400px;
    border: none;
    border-radius: 8px;
    background: #fff;
}

@media (max-width: 700px) {
    .instagram-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .instagram-card {
        min-height: 350px;
        padding: 8px;
    }
    .instagram-card iframe {
        height: 350px;
    }
}