Base Styles:root {
    /* Primary Colors - Light green with white touches */
    --primary-gradient: linear-gradient(135deg, #4ade80 0%, #34d399 50%, #10b981 100%);
    --secondary-gradient: linear-gradient(135deg, #a7f3d0 0%, #6ee7b7 100%);

    /* Homepage Colors - Unique gradient that represents all categories */
    --homepage-gradient: linear-gradient(135deg, #0ea5e9 0%, #6366f1 35%, #8b5cf6 65%, #10b981 100%);
    --homepage-secondary: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);

    /* Category-specific Primary Colors */
    --biology-primary: #10b981;
    /* Natural green */
    --chemistry-primary: #8b5cf6;
    /* Rich purple */
    --construction-primary: #475569;
    /* Slate/concrete */
    --conversion-primary: #0ea5e9;
    /* Sky blue */
    --ecology-primary: #22c55e;
    /* Fresh green */
    --everyday-primary: #6366f1;
    /* Indigo */
    --finance-primary: #0f766e;
    /* Teal/money green */
    --food-primary: #84cc16;
    /* Lime/fresh */
    --health-primary: #06b6d4;
    /* Cyan/medical blue */
    --math-primary: #3b82f6;
    /* Blue */
    --physics-primary: #6366f1;
    /* Indigo */
    --sports-primary: #14b8a6;
    /* Teal */
    --statistics-primary: #8b5cf6;
    /* Purple */

    /* Generated Gradients for Categories */
    /*     
    --biology-gradient: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    --chemistry-gradient: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    --construction-gradient: linear-gradient(135deg, #475569 0%, #64748b 100%);
    --conversion-gradient: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
    --ecology-gradient: linear-gradient(135deg, #22c55e 0%, #4ade80 100%);
    --everyday-gradient: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
    --finance-gradient: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
    --food-gradient: linear-gradient(135deg, #84cc16 0%, #a3e635 100%);
    --health-gradient: linear-gradient(135deg, #06b6d4 0%, #22d3ee 100%);
    --math-gradient: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    --physics-gradient: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
    --sports-gradient: linear-gradient(135deg, #14b8a6 0%, #2dd4bf 100%);
    --statistics-gradient: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%); */
    /* Current Category - Defaults to homepage */
    --current-primary: var(--math-primary);
    --current-gradient: var(--homepage-gradient);

    /* Background Colors - Very light, airy backgrounds */
    --bg-light: #ffffff;
    --bg-light-alt: #f8fafc;
    --bg-dark: #064e3b;
    --bg-dark-alt: #065f46;

    /* Text Colors - Softer, not harsh black */
    --text-primary: #ffffff;
    --text-secondary: #64748b;
    --text-light: #f8fafc;

    /* Shadow */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;

    --primary-color: #4a6cf7;
    --primary-color-dark: #3151e8;
    --secondary-color: #6b7385;
    --text-color: #292e3a;
    --text-color-light: #545a6c;
    --background-color: #ffffff;
    --background-color-alt: #f5f8ff;
    --border-color: #e9edf7;
    --shadow-color: rgba(74, 108, 247, 0.1);
    --card-background: #ffffff;
    --header-background: #ffffff;
    --footer-background: #f5f8ff;

    /* Gradients */
    --gradient-primary: linear-gradient(45deg, #4a6cf7, #6e8eff);
    --gradient-secondary: linear-gradient(45deg, #6b7385, #9ba3b9);

    /* Shadows */
    --shadow-sm: 0 2px 6px rgba(74, 108, 247, 0.08);
    --shadow-md: 0 5px 15px rgba(74, 108, 247, 0.1);
    --shadow-lg: 0 10px 25px rgba(74, 108, 247, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #e8e3ff 0%, #f0e8ff 25%, #f8f5ff 50%, #fff8f5 75%, #f5f8ff 100%);
    min-height: 100vh;
    color: var(--text-primary);
}

/* Non-homepage background color */
body:not(.homepage) {
    background: #ffffff;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

button {
    cursor: pointer;
    font-family: inherit;
}

.gradient-text {
    background: #ffd60a;
    background-clip: text;
    color: transparent;
    font-weight: 700;
}

/* Header Styles */
header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;

}

.navbar {
    padding: 1rem 0;
    -webkit-box-shadow: 0px 15px 22px -1px rgba(0, 0, 0, 0.22);
    box-shadow: 0px 15px 22px -1px rgba(0, 0, 0, 0.22);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    position: relative;
    max-width: 100%;

}

.logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
}

/* Desktop Navigation */
.desktop-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    color: #1f2937;
    font-size: 0.95rem;
    font-weight: 400;
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    color: #000000;
    font-weight: 500;
}

.nav-menu li a.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #000000;
}

/* Sign In Button */
.sign-in-btn {
    background-color: #000000;
    color: #ffffff;
    border: none;
    padding: 0.6rem 1.8rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sign-in-btn:hover {
    background-color: #1f2937;
    transform: translateY(-1px);
}

.nav-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
}






/* Logo Image Styles */
.logo-image {
    height: 40px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    display: block;
}

.footer-logo-image {
    height: 48px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    margin-bottom: 10px;
    display: block;
}

/* Responsive logo sizing */
@media (max-width: 768px) {
    .logo-image {
        height: 28px;
        max-width: 120px;
    }

    .footer-logo-image {
        height: 40px;
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .logo-image {
        height: 24px;
        max-width: 100px;
    }

    .footer-logo-image {
        height: 36px;
        max-width: 120px;
    }
}

.search-container {
    flex: 1;
    max-width: 700px;
    margin: 0 1rem;
    display: flex;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 10px 0 0 10px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2);
}

.search-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    border-radius: 10px;
}

.nav-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}



/* Hamburger Menu */
.hamburger-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 220px;
    background-color: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 1rem 0;
    z-index: 101;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.hamburger-menu.active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0);
}



.hamburger-menu-items li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.hamburger-menu-items li a:hover {
    color: var(--text-primary);
    background-color: var(--bg-light-alt);
}

.hamburger-menu-items li a i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}



/* Categories Navigation */
.categories-nav {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
    padding: 0.75rem 0;
    background-color: white;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.categories-nav::-webkit-scrollbar {
    display: flex;
    /* Chrome, Safari, Edge */
}

.categories-list {
    display: flex;
    padding: 0.5rem 0;
    width: max-content;
    /* Ensure it doesn't wrap */
}

.category-item {
    margin-right: 1rem;
    display: inline-block;
    white-space: nowrap;
}

.category-item:last-child {
    margin-right: 2rem;
    /* Add extra padding at the end */
}

.category-item a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 0.6rem 1.2rem;
    position: relative;
    transition: all 0.3s ease;
    border-radius: var(--radius-md);
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: inline-block;
    transform: translateY(0);
}

.category-item a:hover,
.category-item a.active {
    color: white;
    background: var(--current-gradient);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
    border-color: transparent;
}

.category-item a i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

.categories-nav::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Edge */
}

.categories-list {
    display: flex;
    padding: 0.5rem 0;
    width: max-content;
    /* Ensure it doesn't wrap */
}

.category-item {
    margin-right: 1rem;
    display: inline-block;
    white-space: nowrap;
}

.category-item:last-child {
    margin-right: 2rem;
    /* Add extra padding at the end */
}

.category-item a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 0.6rem 1.2rem;
    position: relative;
    transition: all 0.3s ease;
    border-radius: var(--radius-md);
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: inline-block;
    transform: translateY(0);
}

.category-item a:hover,
.category-item a.active {
    color: white;
    background: var(--current-gradient);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
    border-color: transparent;
}

.category-item a i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

/* Hero Section */
.hero-section {
    background: #1a1a1a;
    color: white;
    padding: 4rem 0 5rem;
    text-align: left;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 2.5rem;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.hero-search {
    display: flex;
    max-width: 600px;
    margin: 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.hero-search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    font-size: 1rem;
    color: #1f2937;
}

.hero-search-input::placeholder {
    color: #9ca3af;
}

.hero-search-input:focus {
    outline: none;
}

.hero-search-btn {
    background-color: transparent;
    color: #1f2937;
    font-weight: 500;
    padding: 1rem 1.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.hero-search-btn:hover {
    color: #000000;
}

/* Category Grid Section */
.category-grid-section {
    padding: 4rem 0;
    background: #f9fafb;
}

.category-grid-section .container {
    max-width: 1200px;
}

.category-grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.category-grid-item {
    background: white;
    border-radius: 12px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: inherit;
}

.category-grid-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.category-grid-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #1f2937;
}

.category-grid-content {
    flex: 1;
}

.category-grid-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.category-grid-desc {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.category-grid-count {
    font-size: 0.875rem;
    color: #9ca3af;
}

/* About Us Section */
.about-us-section {
    padding: 5rem 0;
    background: white;
}

.about-us-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-us-content h2 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2rem;
}

.about-us-content p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #4b5563;
    margin-bottom: 1.5rem;
}

.about-cta-btn {
    display: inline-block;
    background-color: #000000;
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.about-cta-btn:hover {
    background-color: #1f2937;
    transform: translateY(-2px);
}

/* Featured Calculators */

.featured-calculators h2 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #064E3B;
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.calculator-card {
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.calculator-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.featured-calculator-card-h3 {
    color: #064E3B;
}

.calculator-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: white;
    font-size: 1.25rem;
}

.math-icon {
    background: var(--math-gradient);
}

.health-icon {
    background: var(--health-gradient);
}

.physics-icon {
    background: var(--physics-gradient);
}

.finance-icon {
    background: var(--finance-gradient);
}

.calculator-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #064E3B;
}

.calculator-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.calculator-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    color: #6366f1;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: 1px solid #6366f1;
    transition: all 0.3s ease;
    text-align: center;
}

.calculator-link:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

/* Categories Section */
.categories-section {
    margin-bottom: 4rem;
    padding: 0 1rem;
}

.categories-section h2 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #064E3B;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
    max-width: 1300px;
    margin: 0 auto;
}

.category-card {
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-card h3 {
    color: #064E3B;
}

.category-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.5rem;
}

.biology-icon {
    background: var(--biology-gradient);
}

.chemistry-icon {
    background: var(--chemistry-gradient);
}

.construction-icon {
    background: var(--construction-gradient);
}

.conversion-icon {
    background: var(--conversion-gradient);
}

.everyday-icon {
    background: var(--everyday-gradient);
}

.food-icon {
    background: var(--food-gradient);
}

.category-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #064E3B;
}

.category-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.view-more {
    margin-top: 2rem;
    text-align: center;
}

.view-more-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #064E3B;
    color: white;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.view-more-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Footer */
footer {
    background-color: #3F83F3;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    flex: 1;
    min-width: 250px;
}

.footer-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 1rem;
}

.footer-logo p {
    opacity: 0.7;
    max-width: 300px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-column h4 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.footer-column ul li {
    margin-bottom: 0.5rem;
}

.footer-column ul li a {
    opacity: 0.7;
    transition: opacity 0.3s;
}

.footer-column ul li a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    opacity: 0.5;
    font-size: 0.875rem;
}

/* Mega Menu */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    border-top: 1px solid #e2e8f0;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.category-item:hover .mega-menu {
    opacity: 1;
    visibility: visible;
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

/* Calculator Page */
.calculator-container {
    max-width: 800px;
    margin: 2rem auto 4rem;
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem;
}

.calculator-header {
    margin-bottom: 2rem;
    text-align: center;
}

.calculator-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.calculator-header p {
    color: var(--text-secondary);
}

.calculator-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.form-control::placeholder {
    color: #a0aec0;
}

.form-helper {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.calculate-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    width: 100%;
    transition: all 0.3s ease;
}

.calculate-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.result-container {
    padding: 1.5rem;
    background-color: var(--bg-light-alt);
    border-radius: var(--radius-md);
}

.result-title {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
    color: #6366f1;
    margin-bottom: 1rem;
}

.result-explanation {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Category Page */
.category-page-header {
    background: var(--primary-gradient);
    color: white;
    padding: 3rem 0;
    text-align: center;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    margin-bottom: 3rem;
}

.category-page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.category-page-header p {
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}

.category-page-header .category-icon {
    margin-bottom: 1.5rem;
}

.category-description {
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* BMI Scale */
.bmi-scale {
    display: flex;
    margin: 2rem 0;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.bmi-scale-item {
    flex: 1;
    padding: 1rem 0.5rem;
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bmi-scale-item span:first-child {
    font-weight: 600;
}

.bmi-scale-item span:last-child {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Result Info */
.result-info {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.result-info h4 {
    margin: 1.5rem 0 0.5rem;
    font-size: 1.1rem;
}

.result-info h4:first-child {
    margin-top: 0;
}

.result-info p,
.result-info ul {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.result-info ul {
    padding-left: 1.5rem;
    list-style-type: disc;
}

.result-info ul li {
    margin-bottom: 0.25rem;
}

/* Result Breakdown */
.result-breakdown {
    margin: 1.5rem 0;
    padding: 1rem;
    background-color: white;
    border-radius: var(--radius-md);
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-item span:first-child {
    color: var(--text-secondary);
}

.breakdown-item span:last-child {
    font-weight: 600;
}

/* Form Error */
.form-error {
    display: none;
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.form-control.invalid {
    border-color: #ef4444;
}

.form-control.invalid:focus {
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

/* Responsive */
@media (max-width: 1200px) {
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    header {
        background-color: #3F83F3;
    }

    .navbar {
        padding: 0.75rem 0;
    }

    .navbar .container {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0 1rem;
        position: relative;
    }

    /* Logo centered on mobile */
    .logo {
        text-align: center;
    }

    .logo a {
        font-size: 1.75rem;
    }

    /* Hide header search on mobile */
    .navbar .hero-search {
        display: none !important;
    }

    /* Position buttons at the sides */
    .hamburger-btn {
        position: absolute;
        left: 1rem;
        background-color: transparent;
        border: none;
        color: white;
        font-size: 1.25rem;
        padding: 0.5rem;
    }

    /*
    .dark-mode-toggle {
        position: absolute;
        right: 1rem;
        background-color: transparent;
        border: none;
        color: white;
        font-size: 1.25rem;
        padding: 0.5rem;
    }
    */

    /* Categories navigation - white background on mobile */
    .categories-nav {
        background-color: white;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        padding: 0.5rem 0;
    }

    .categories-list {
        display: flex;
        flex-wrap: nowrap;
        padding: 0 0.5rem;
        gap: 0.5rem;
    }

    .category-item a {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
        color: #333;
        background-color: #f5f5f5;
        border: none;
        box-shadow: none;
        white-space: nowrap;
    }

    /* Hero section on mobile */
    .hero-section {
        padding: 1.5rem 0;
    }

    .hero-content h1 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    /* Show search in hero section on mobile with button inside */
    .hero-section .hero-search {
        display: flex;
        max-width: 100%;
        margin: 0 auto;
        width: 100%;
        position: relative;
    }

    .hero-section .hero-search-input {
        width: 100%;
        border-radius: var(--radius-md);
        padding: 0.75rem 1rem;
        padding-right: 4.5rem;
        height: 45px;
        margin-bottom: 0;
        border: none;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    .hero-section .hero-search-btn {
        position: absolute;
        right: 5px;
        top: 5px;
        border-radius: calc(var(--radius-md) - 2px);
        height: 35px;
        padding: 0 1rem;
        background-color: #3F83F3;
        color: white;
        font-size: 0.9rem;
        border: none;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    /* Position nav buttons container properly */
    .nav-buttons {
        position: static;
        width: auto;
        margin: 0;
        display: contents;
    }

    /* Fix hamburger menu position to open on the left side */
    .hamburger-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: auto;
        width: 200px;
        z-index: 1000;
    }

    /* Hide the featured calculators section on mobile */
    .featured-calculators {
        display: none;
    }

    /* Style the categories section like the image */
    .mobile-categories {
        padding: 1rem;
        background-color: #f5f8ff;
    }

    .mobile-category-item {
        display: flex;
        align-items: center;
        background-color: white;
        border-radius: 8px;
        padding: 0.75rem 1rem;
        margin-bottom: 0.75rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .mobile-category-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 8px;
        margin-right: 1rem;
        color: #3F83F3;
    }

    .mobile-category-text {
        flex: 1;
    }

    .mobile-category-text h3 {
        font-size: 1rem;
        font-weight: 500;
        color: #333;
        margin: 0;
    }

    .mobile-category-count {
        color: #999;
        font-size: 0.8rem;
        text-align: right;
    }
}

@media (max-width: 576px) {
    .calculator-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .calculator-card {
        padding: 1rem;
    }

    .calculator-icon {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.125rem;
        margin-bottom: 0.5rem;
    }

    .calculator-card h3 {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
        color: #064E3B;
    }

    .calculator-card p {
        display: none;
    }

    .calculator-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .category-card {
        padding: 1rem 0.75rem;
    }

    .category-icon {
        width: 3rem;
        height: 3rem;
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }

    .category-card h3 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
        color: #064E3B;
    }

    .category-card p {
        font-size: 0.75rem;
    }
}

/* Homepage specific styling */
.homepage {
    --current-gradient: var(--homepage-gradient);
}

.homepage .hero-section {
    background: linear-gradient(135deg, #0ea5e9, #6366f1, #8b5cf6, #10b981);
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
}

.homepage .category-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.homepage .category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Each category card gets its own themed color on homepage */
.homepage .category-card.biology {
    background: linear-gradient(to bottom right, white, white 80%, #d1fae5);
}

.homepage .category-card.biology:hover {
    background: linear-gradient(to bottom right, white, #d1fae5);
}

.homepage .category-card.biology .category-icon {
    background: var(--biology-gradient);
}

.homepage .category-card.finance {
    background: linear-gradient(to bottom right, white, white 80%, #ccfbf1);
}

.homepage .category-card.finance:hover {
    background: linear-gradient(to bottom right, white, #ccfbf1);
}

.homepage .category-card.finance .category-icon {
    background: var(--finance-gradient);
}

.homepage .category-card.health {
    background: linear-gradient(to bottom right, white, white 80%, #cffafe);
}

.homepage .category-card.health:hover {
    background: linear-gradient(to bottom right, white, #cffafe);
}

.homepage .category-card.health .category-icon {
    background: var(--health-gradient);
}

/* Dark Mode Styles for hero section */
body.dark-mode .hero-section {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6, #1e3a8a);
    background-size: 300% 300%;
    animation: gradientAnimation 15s ease infinite;
}

body.dark-mode.homepage .hero-section {
    background: linear-gradient(135deg, #0c4a6e, #0284c7, #4f46e5, #0f766e);
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
}

/* Animations */
@keyframes gradientAnimation {
    0% {
        background-position: 0% 0%;
    }

    25% {
        background-position: 100% 0%;
    }

    50% {
        background-position: 100% 100%;
    }

    75% {
        background-position: 0% 100%;
    }

    100% {
        background-position: 0% 0%;
    }
}

@keyframes rotateCircle {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Category page themes */
.biology-theme {
    --current-primary: var(--biology-primary);
    --current-gradient: var(--biology-gradient);
}

.chemistry-theme {
    --current-primary: var(--chemistry-primary);
    --current-gradient: var(--chemistry-gradient);
}

.conversion-theme {
    --current-primary: var(--conversion-primary);
    --current-gradient: var(--conversion-gradient);
}

.finance-theme {
    --current-primary: var(--finance-primary);
    --current-gradient: var(--finance-gradient);
}

.health-theme {
    --current-primary: var(--health-primary);
    --current-gradient: var(--health-gradient);
}

.math-theme {
    --current-primary: var(--math-primary);
    --current-gradient: var(--math-gradient);
}

.physics-theme {
    --current-primary: var(--physics-primary);
    --current-gradient: var(--physics-gradient);
}

.sports-theme {
    --current-primary: var(--sports-primary);
    --current-gradient: var(--sports-gradient);
}

.statistics-theme {
    --current-primary: var(--statistics-primary);
    --current-gradient: var(--statistics-gradient);
}

/* Dark Mode Styles */
.dark-theme {
    --primary-color: #5d7cff;
    --primary-color-dark: #4a6cf7;
    --secondary-color: #8b92a3;
    --text-color: #e1e6f9;
    --text-color-light: #acb4d0;
    --background-color: #131820;
    --background-color-alt: #1e2530;
    --border-color: #2a3142;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --card-background: #1e2530;
    --header-background: #131820;
    --footer-background: #1e2530;

    /* Gradients */
    --gradient-primary: linear-gradient(45deg, #5d7cff, #7993ff);
    --gradient-secondary: linear-gradient(45deg, #8b92a3, #a9b1c7);

    /* Shadows */
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Dark Mode */
body.dark-mode {
    background-color: #131820;
    color: #e1e6f9;

    --dark-bg: #131820;
    --dark-bg-alt: #1e2530;
    --dark-card-bg: #1e2530;
    --dark-border: #2a3142;
    --dark-text-primary: #e1e6f9;
    --dark-text-secondary: #acb4d0;
    --dark-shadow-md: 0 5px 15px rgba(0, 0, 0, 0.25);
    --dark-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.3);
}

body.dark-mode header {
    background-color: #1a212e;
    box-shadow: var(--dark-shadow-md);
}

body.dark-mode .search-btn {
    background: #2a3142;
}

body.dark-mode .categories-nav {
    background-color: #1a212e;
    border-top: 1px solid var(--dark-border);
}

body.dark-mode .search-input {
    background-color: var(--dark-bg);
    border-color: var(--dark-border);
    color: var(--dark-text-primary);
}

body.dark-mode .search-input:focus {
    border-color: #4a6cf7;
    box-shadow: 0 0 0 2px rgba(74, 108, 247, 0.2);
}

body.dark-mode .hamburger-btn,
body.dark-mode .dark-mode-toggle {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}

body.dark-mode .hamburger-btn:hover,
body.dark-mode .dark-mode-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .hamburger-menu {
    background-color: #1e2530;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid #2a3142;
}

body.dark-mode .hamburger-menu-items li a {
    color: #acb4d0;
}

body.dark-mode .hamburger-menu-items li a:hover {
    color: #e1e6f9;
    background-color: #232c3d;
}

body.dark-mode .category-item a {
    background-color: #1e2530;
    border-color: #2a3142;
    color: #acb4d0;
}

body.dark-mode .category-item a:hover,
body.dark-mode .category-item a.active {
    color: white;
    background: var(--current-gradient);
    border-color: transparent;
}

body.dark-mode .calculator-card {
    background-color: #1e2530;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
    border: 1px solid #2a3142;
}

body.dark-mode .calculator-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: #374151;
}

body.dark-mode .calculator-card h3 {
    color: #e1e6f9;
}

body.dark-mode .featured-calculators h2 {
    color: #ffffff;
}

body.dark-mode .calculator-card p {
    color: #acb4d0;
}

body.dark-mode .calculator-link {
    border-color: #4a6cf7;
    color: #4a6cf7;
}

body.dark-mode .calculator-link:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

body.dark-mode .calculator-container {
    background-color: #1e2530;
    border: 1px solid #2a3142;
}

body.dark-mode .category-card {
    background-color: #1e2530;
    border: 1px solid #2a3142;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
}

body.dark-mode .category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: #374151;
    background-color: #232c3d;
}

body.dark-mode .category-card h3 {
    color: #e1e6f9;
}

body.dark-mode .category-card p {
    color: #acb4d0;
}

body.dark-mode .view-more-btn {
    background: linear-gradient(135deg, #3f4a5e 0%, #2a3142 100%);
    color: #e1e6f9;
    border: none;
}

body.dark-mode .view-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
}

body.dark-mode footer {
    background-color: #1a212e;
}

body.dark-mode .footer-bottom {
    border-top: 1px solid #2a3142;
}

body.dark-mode .form-control {
    background-color: #131820;
    border-color: #2a3142;
    color: #e1e6f9;
}

body.dark-mode .form-control:focus {
    border-color: #4a6cf7;
    box-shadow: 0 0 0 2px rgba(74, 108, 247, 0.2);
}

body.dark-mode .form-helper {
    color: #acb4d0;
}

body.dark-mode .result-container {
    background-color: #232c3d;
}

body.dark-mode .hero-section {
    background: var(--homepage-gradient);
}

/* Desktop header layout */
@media (min-width: 769px) {
    .navbar .container {
        padding: 0 1rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .logo {
        flex-shrink: 0;
        margin-right: 0;
        width: 120px;
        flex: 0 0 auto;
    }

    .hamburger-btn {
        display: flex;
        order: 3;
    }

    .nav-buttons {
        order: 3;
        margin-left: 0;
        width: 100px;
        flex: 0 0 auto;
    }

    .hero-search {
        order: 2;
        flex: 1;
        max-width: 900px;
        margin: 0;
        width: 100%;
        padding: 0 2rem;
        /* Show search on all pages for desktop */
        display: flex;
    }

    .hero-search-input {
        height: 36px;
        padding: 0.4rem 1rem;
    }

    .hero-search-btn {
        height: 36px;
        padding: 0.4rem 1rem;
    }

    /* Hide search container */
    .search-container {
        display: none;
    }

    /* White background for categories on desktop */
    .categories-nav {
        background-color: white;
    }

    /* Desktop category hover fix - alternative approach */
    .category-item a:hover {
        color: white !important;
        background: linear-gradient(135deg, #3F83F3, #64a6ff) !important;
        border-color: transparent !important;
        border-radius: 10px !important;
        transform: translateY(-2px) !important;
    }

    /* Biology specific hover */
    .biology-theme .category-item a:hover {
        background: linear-gradient(135deg, #10b981, #34d399) !important;
    }

    /* Homepage default hover */
    .homepage .category-item a:hover {
        background: linear-gradient(135deg, #0ea5e9, #6366f1, #8b5cf6, #10b981) !important;
    }
}

/* Mobile styles for hero search */
@media (max-width: 768px) {

    /* Hide header search on homepage */
    body.homepage .navbar .hero-search {
        display: none;
    }

    /* Show header search on all other pages */
    body:not(.homepage) .navbar .hero-search {
        display: flex;
    }

    /* Hide hero section search on non-homepage */
    body:not(.homepage) .hero-section .hero-search {
        display: none;
    }

    /* Show hero section search only on homepage */
    body.homepage .hero-section .hero-search {
        display: flex;
    }

    /* Show and style hero section search on mobile only */
    .hero-section .hero-search {
        display: flex;
        max-width: 100%;
        margin: 0 auto;
        width: 100%;
        position: relative;
    }

    .hero-section .hero-search-input {
        width: 100%;
        border-radius: var(--radius-md);
        padding: 0.75rem 1rem;
        padding-right: 4.5rem;
        /* Make room for the button */
        height: 45px;
        margin-bottom: 0;
        border: none;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    .hero-section .hero-search-btn {
        position: absolute;
        right: 5px;
        top: 5px;
        border-radius: calc(var(--radius-md) - 2px);
        height: 35px;
        padding: 0 1rem;
        background-color: #3F83F3;
        color: white;
        font-size: 0.9rem;
        border: none;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
}

/* Remove settings button styles */
.settings-btn {
    display: none;
}

.settings-btn:hover {
    display: none;
}

body.dark-mode .settings-btn {
    display: none;
}

/* Mobile categories section - hidden by default on desktop */
.mobile-categories {
    display: none;
}

@media (max-width: 768px) {

    /* Show mobile categories section on mobile */
    .mobile-categories {
        display: block;
    }
}

/* Mobile About Us Section - Beautiful Minimalistic Design */
.mobile-about-section {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    padding: 3rem 1.5rem;
    margin: 2rem 1rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease-out forwards;
}

.mobile-about-content {
    text-align: center;
}

.mobile-about-icon {
    background: linear-gradient(135deg, #3F83F3 0%, #64a6ff 100%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    margin: 0 auto 1rem;
    box-shadow: 0 10px 20px rgba(63, 131, 243, 0.3);
    transition: transform 0.5s ease;
}

.mobile-about-icon:hover {
    transform: translateY(-5px) scale(1.05);
}

.mobile-about-title {
    color: #1e293b;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.mobile-about-divider {
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, #3F83F3 0%, #64a6ff 100%);
    border-radius: 2px;
    margin: 0 auto 2rem;
}

.mobile-about-text {
    color: #64748b;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.mobile-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.mobile-feature-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
    color: #475569;
    background: rgba(63, 131, 243, 0.08);
    border-radius: 10px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.mobile-feature-item i {
    color: #3F83F3;
}

.mobile-feature-item:hover {
    background: rgba(63, 131, 243, 0.15);
}

.mobile-about-btn {
    display: inline-block;
    background: linear-gradient(135deg, #3F83F3 0%, #64a6ff 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(63, 131, 243, 0.2);
    position: relative;
    overflow: hidden;
}

.mobile-about-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(63, 131, 243, 0.3);
}

.mobile-about-btn i {
    transition: transform 0.3s ease;
}

.mobile-about-btn:hover i {
    transform: translateX(5px);
}

@media (min-width: 769px) {
    .mobile-about-section {
        display: none;
    }
}

/* Popular Calculators Section - Desktop and Mobile */
.popular-calculators-section {
    padding: 2rem 1.5rem;
}

.popular-calculators-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #333;
    font-weight: 600;
}

.popular-calculators-grid {
    display: flex;
    flex-direction: column;
}

.popular-calculator-card {
    background-color: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
    position: relative;
    text-decoration: none;
}

.popular-calculator-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.popular-calculator-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popular-calculator-title i {
    color: #aaa;
    font-size: 0.9rem;
}

.popular-calculator-desc {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.calculator-category-tag {
    color: #888;
    font-size: 0.8rem;
    margin-top: auto;
}

@media (min-width: 769px) {
    .popular-calculators-section {
        max-width: 1200px;
        margin: 0 auto;
        padding: 3rem 2rem;
    }

    .popular-calculators-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .popular-calculator-card {
        margin-bottom: 0;
        height: 100%;
    }
}

/* Hide categories section */
.categories-section {
    display: none;
}

/* Category Grid Section (Desktop) */
.category-grid-section {
    padding: 3rem 2rem;
    margin: 0 auto;
    max-width: 1200px;
    display: none;
    /* Hidden by default, will be shown on desktop */
}

.category-grid-section h2 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #333;
    font-weight: 600;
}

.category-grid-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
}

.category-grid-item {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1.5rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #e9ecef;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.category-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.category-grid-icon {
    color: #3F83F3;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-grid-name {
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.5rem;
}

.category-grid-count {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Desktop About Us Section - Beautiful Minimalistic Design */
.desktop-about-section {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    padding: 4rem 2rem;
    margin: 3rem auto;
    max-width: 1200px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    display: none;
    /* Hidden by default, will be shown on desktop */
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.desktop-about-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(63, 131, 243, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.about-content-wrapper {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.about-icon-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-icon {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #3F83F3 0%, #64a6ff 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    box-shadow: 0 15px 30px rgba(63, 131, 243, 0.3);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.about-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #64a6ff 0%, #3F83F3 100%);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.about-icon:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 25px 50px rgba(63, 131, 243, 0.4);
}

.about-icon:hover::before {
    opacity: 1;
}

.about-icon i {
    position: relative;
    z-index: 1;
}

.about-text-content {
    text-align: left;
}

.desktop-about-title {
    color: #1e293b;
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
    opacity: 0;
    transform: translateX(30px);
    animation: slideInRight 0.8s ease-out 0.2s forwards;
}

.desktop-about-mainline {
    font-weight: 900px;
}

.desktop-about-text {
    color: #000000;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-weight: 400;

    transform: translateX(30px);
    animation: slideInRight 0.8s ease-out 0.6s forwards;
}

.desktop-about-text:last-of-type {
    margin-bottom: 2.5rem;
    animation-delay: 0.7s;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out 0.8s forwards;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(63, 131, 243, 0.05);
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(63, 131, 243, 0.1);
}

.feature-item:hover {
    background: rgba(63, 131, 243, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(63, 131, 243, 0.15);
}

.feature-item i {
    color: #3F83F3;
    font-size: 1.2rem;
    transition: transform 0.4s ease;
}

.feature-item:hover i {
    transform: scale(1.1);
}

.feature-item span {
    color: #475569;
    font-weight: 500;
    font-size: 0.95rem;
}

.desktop-about-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #3F83F3 0%, #64a6ff 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px rgba(63, 131, 243, 0.3);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out 1s forwards;
}

.desktop-about-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #64a6ff 0%, #3F83F3 100%);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.desktop-about-btn:hover::before {
    left: 0;
}

.desktop-about-btn span,
.desktop-about-btn i {
    position: relative;
    z-index: 1;
}

.desktop-about-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(63, 131, 243, 0.4);
}

.desktop-about-btn i {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.desktop-about-btn:hover i {
    transform: translateX(5px);
}

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleInX {
    to {
        opacity: 1;
        transform: scaleX(1);
    }
}

/* Hide categories section on mobile, show on desktop */
@media (max-width: 768px) {

    .category-grid-section,
    .desktop-about-section {
        display: none;
    }
}

@media (min-width: 769px) {

    .category-grid-section,
    .desktop-about-section {
        display: block;
    }

    /* Hide the mobile-specific section on desktop */
    .categories-section {
        display: none;
    }
}

/* Mobile category hover style */
@media (max-width: 768px) {
    .category-item a:hover {
        color: white !important;
        background: linear-gradient(135deg, #3F83F3, #64a6ff) !important;
        border-color: transparent !important;
        border-radius: 10px !important;
    }

    /* Biology specific hover for mobile */
    .biology-theme .category-item a:hover {
        background: linear-gradient(135deg, #10b981, #34d399) !important;
    }

    /* Homepage default hover for mobile */
    .homepage .category-item a:hover {
        background: linear-gradient(135deg, #0ea5e9, #6366f1, #8b5cf6, #10b981) !important;
    }
}

/* Page Search Section (visible on all pages except homepage) */
.page-search-section {
    background-color: #f5f8ff;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e9edf7;
    display: none;
    /* Hidden by default, will be shown on non-homepage */
}

.page-search-section .hero-search {
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
    display: flex;
}

.page-search-section .hero-search-input {
    flex: 1;
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 10px 0 0 10px;
    font-size: 1rem;
    height: 40px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.page-search-section .hero-search-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.page-search-section .hero-search-btn {
    background-color: #3F83F3;
    color: white;
    font-weight: 700;
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 0 10px 10px 0;
    transition: all 0.3s ease;
    height: 40px;
}

.page-search-section .hero-search-btn:hover {
    background-color: #2563eb;
}

/* Show search section on all pages except homepage */
body:not(.homepage) .page-search-section {
    display: block;
}

/* Hide search section on homepage */
body.homepage .page-search-section {
    display: none;
}

/* Mobile styles for page search section */
@media (max-width: 768px) {
    .page-search-section {
        padding: 1rem 0;
    }

    .page-search-section .hero-search {
        max-width: 100%;
    }

    .page-search-section .hero-search-input {
        height: 45px;
        padding: 0.75rem 1rem;
    }

    .page-search-section .hero-search-btn {
        height: 45px;
        padding: 0.75rem 1.5rem;
    }
}

/* Hide header search on all pages except homepage */
.navbar .hero-search {
    display: none;
}

/* Show header search only on homepage */
.navbar .hero-search {
    display: flex;
}

/* Search bar visibility rules */
/* Desktop: Show search in header on all pages */
@media (min-width: 769px) {
    .navbar .hero-search {
        display: flex;
    }
}

/* Mobile: Show search in header only on non-homepage */
@media (max-width: 768px) {

    /* Hide header search on homepage */
    body.homepage .navbar .hero-search {
        display: none;
    }

    /* Show header search on all other pages */
    body:not(.homepage) .navbar .hero-search {
        display: flex;
    }
}

/* Hamburger Button */
.hamburger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 1.1rem;
    color: white;
    transition: all 0.3s ease;
    width: 2.5rem;
    height: 2.5rem;
}

.hamburger-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Mobile Header Styles */
.mobile-search-container {
    display: none;
}

/* Hero section search bar - hidden by default on all devices */
.hero-section .hero-search {
    display: none;
}

/* Mobile styles for hero search */
@media (max-width: 768px) {

    /* Hide header search on homepage */
    body.homepage .navbar .hero-search {
        display: none;
    }

    /* Show header search on all other pages */
    body:not(.homepage) .navbar .hero-search {
        display: flex;
    }

    /* Hide hero section search on non-homepage */
    body:not(.homepage) .hero-section .hero-search {
        display: none;
    }

    /* Show hero section search only on homepage */
    body.homepage .hero-section .hero-search {
        display: flex;
    }

    /* Show and style hero section search on mobile only */
    .hero-section .hero-search {
        display: flex;
        max-width: 100%;
        margin: 0 auto;
        width: 100%;
        position: relative;
    }

    .hero-section .hero-search-input {
        width: 100%;
        border-radius: var(--radius-md);
        padding: 0.75rem 1rem;
        padding-right: 4.5rem;
        /* Make room for the button */
        height: 45px;
        margin-bottom: 0;
        border: none;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    .hero-section .hero-search-btn {
        position: absolute;
        right: 5px;
        top: 5px;
        border-radius: calc(var(--radius-md) - 2px);
        height: 35px;
        padding: 0 1rem;
        background-color: #3F83F3;
        color: white;
        font-size: 0.9rem;
        border: none;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
}

/* ============================================
   REDESIGNED ABOUT US SECTION
   ============================================ */

.about-us-section {
    padding: 4rem 1.5rem;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 50%, #f0f7ff 100%);
    position: relative;
    overflow: hidden;
}

.about-us-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(63, 131, 243, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.about-us-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(100, 166, 255, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.about-us-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.about-us-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #3F83F3 0%, #64a6ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-us-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #3F83F3 0%, #64a6ff 100%);
    margin: 0 auto 1.5rem;
    border-radius: 2px;
}

.about-us-subtitle {
    font-size: 1.125rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.about-us-content {
    position: relative;
    z-index: 1;
}

.about-us-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.about-us-text-block {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.about-us-text-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #3F83F3 0%, #64a6ff 100%);
}

.about-us-text-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(63, 131, 243, 0.15);
}

.about-icon-badge {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3F83F3 0%, #64a6ff 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 20px rgba(63, 131, 243, 0.3);
    transition: transform 0.3s ease;
}

.about-us-text-block:hover .about-icon-badge {
    transform: scale(1.1) rotate(5deg);
}

.about-icon-badge i {
    font-size: 1.75rem;
    color: white;
}

.about-us-text-block h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
}

.about-us-text-block p {
    font-size: 1rem;
    color: #64748b;
    line-height: 1.7;
}

/* Stats Cards */
.about-us-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(63, 131, 243, 0.05) 0%, rgba(100, 166, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(63, 131, 243, 0.2);
}

.stat-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #3F83F3 0%, #64a6ff 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 25px rgba(63, 131, 243, 0.3);
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.15) rotate(360deg);
}

.stat-icon i {
    font-size: 2rem;
    color: white;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #3F83F3 0%, #64a6ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: #64748b;
    font-weight: 500;
}

/* CTA Button */
.about-us-cta {
    text-align: center;
    position: relative;
    z-index: 1;
}

.about-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #3F83F3 0%, #64a6ff 100%);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.125rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(63, 131, 243, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.about-cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.about-cta-btn:hover::before {
    left: 100%;
}

.about-cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(63, 131, 243, 0.4);
}

.about-cta-btn i {
    transition: transform 0.3s ease;
}

.about-cta-btn:hover i {
    transform: translateX(5px);
}

/* Tablet and Desktop Responsive */
@media (min-width: 768px) {
    .about-us-section {
        padding: 5rem 2rem;
    }

    .about-us-title {
        font-size: 3rem;
    }

    .about-us-subtitle {
        font-size: 1.25rem;
    }

    .about-us-main {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }

    .about-us-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .about-us-section {
        padding: 6rem 2rem;
    }

    .about-us-title {
        font-size: 3.5rem;
    }
}

/* Animation for scroll reveal */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.about-us-text-block,
.stat-card {
    animation: fadeInUp 0.6s ease-out forwards;
}

.about-us-text-block:nth-child(1) {
    animation-delay: 0.1s;
}

.about-us-text-block:nth-child(2) {
    animation-delay: 0.2s;
}

.stat-card:nth-child(1) {
    animation-delay: 0.3s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.4s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.5s;
}

/* Responsive Styles for New Design */
@media (max-width: 1024px) {
    .category-grid-container {
        grid-template-columns: repeat(3, 1fr);
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {

    /* Hide desktop navigation on mobile */
    .desktop-nav {
        display: none;
    }

    /* Show hamburger button */
    .hamburger-btn {
        display: block;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: #1f2937;
        cursor: pointer;
        padding: 0.5rem;
    }

    .category-grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .category-grid-item {
        padding: 1.5rem 1rem;
    }

    .hero-section {
        padding: 3rem 0 4rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-search {
        max-width: 100%;
    }

    .about-us-content h2 {
        font-size: 2rem;
    }

    .about-us-content p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .category-grid-container {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .hero-section {
        padding: 2rem 0 3rem;
    }

    .category-grid-item {
        padding: 1.25rem 1rem;
    }

    .category-grid-name {
        font-size: 1.1rem;
    }

    .sign-in-btn {
        padding: 0.5rem 1.2rem;
        font-size: 0.85rem;
    }

    .about-us-content h2 {
        font-size: 1.75rem;
    }
}

/* Hamburger button - hide on desktop */
.hamburger-btn {
    display: none;
}

@media (max-width: 768px) {
    .hamburger-btn {
        display: block;
    }
}

/* ========================================
   MODERN HOMEPAGE REDESIGN STYLES
   ======================================== */

/* Modern Base Styles */
body.homepage {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #ffffff;
    color: #1f2937;
    line-height: 1.6;
}

/* Modern Header */
.main-header {
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .navbar {
    padding: 1.25rem 0;
}

.main-header .logo-image {
    height: 36px;
}

.main-header .logo-fallback {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.main-header .desktop-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.main-header .nav-menu {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-header .nav-menu li a {
    color: #6b7280;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.main-header .nav-menu li a:hover,
.main-header .nav-menu li a.active {
    color: #1f2937;
}

.main-header .nav-menu li a.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
}

/* Modern Hero Section */
.hero-section-modern {
    position: relative;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e293b 100%);
    padding: 6rem 0 8rem;
    overflow: hidden;
}

.hero-background-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content-modern {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.hero-title {
    font-size: 3.75rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.5rem;
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 3rem;
    line-height: 1.7;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Modern Search Bar */
.hero-search-modern {
    display: flex;
    align-items: center;
    max-width: 650px;
    margin: 0 auto 3rem;
    background: #ffffff;
    border-radius: 12px;
    padding: 0.5rem 0.5rem 0.5rem 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-search-modern:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
}

.hero-search-modern .search-icon {
    color: #9ca3af;
    font-size: 1.25rem;
    margin-right: 1rem;
}

.hero-search-input-modern {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.05rem;
    color: #1f2937;
    padding: 0.75rem 0;
    font-family: 'Inter', sans-serif;
}

.hero-search-input-modern::placeholder {
    color: #9ca3af;
}

.hero-search-btn-modern {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.hero-search-btn-modern:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
}

/* Modern Category Section */
.category-section-modern {
    padding: 6rem 0;
    background: #f9fafb;
}

.section-header-modern {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title-modern {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.section-subtitle-modern {
    font-size: 1.125rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

/* Modern Category Grid */
.category-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.category-card-modern {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
}

.category-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.category-card-modern:hover::before {
    transform: scaleX(1);
}

.category-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

.category-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

/* Category Color Variations */
.everyday-life-color {
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
}

.finance-color {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.biology-color {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

.chemistry-color {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
}

.food-color {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
}

.health-color {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
}

.math-color {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
}

.physics-color {
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
}

.construction-color {
    background: linear-gradient(135deg, #64748b 0%, #94a3b8 100%);
}

.sports-color {
    background: linear-gradient(135deg, #14b8a6 0%, #2dd4bf 100%);
}

.conversion-color {
    background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
}

.ecology-color {
    background: linear-gradient(135deg, #22c55e 0%, #4ade80 100%);
}

.category-name-modern {
    font-size: 1.375rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.category-desc-modern {
    font-size: 0.95rem;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

.category-footer-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid #1e5ddc;
}

.category-count {
    font-size: 0.875rem;
    color: #9ca3af;
    font-weight: 500;
}

.category-arrow {
    color: #6366f1;
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.category-card-modern:hover .category-arrow {
    transform: translateX(4px);
}

/* Modern About Section */
.about-section-modern {
    padding: 6rem 0;
    background: #ffffff;
}

.about-content-modern {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text-modern {
    max-width: 600px;
}

.about-title-modern {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 2rem;
    letter-spacing: -0.025em;
}

.about-paragraph-modern {
    font-size: 1.05rem;
    color: #4b5563;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.about-cta-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.about-cta-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.about-cta-modern i {
    transition: transform 0.3s ease;
}

.about-cta-modern:hover i {
    transform: translateX(4px);
}

.about-features-modern {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-card-modern {
    background: #f9fafb;
    padding: 1.75rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.feature-card-modern:hover {
    background: #ffffff;
    border-color: #6366f1;
    transform: translateX(8px);
}

.feature-icon-modern {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.feature-card-modern h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.feature-card-modern p {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

/* Modern Popular Section */
.popular-section-modern {
    padding: 6rem 0;
    background: #f4f9ff;
}

.popular-grid-modern {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.popular-card-modern {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.popular-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

.popular-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
}

.popular-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    flex: 1;
}

.popular-header i {
    color: #6366f1;
    font-size: 1.125rem;
    transition: transform 0.3s ease;
}

.popular-card-modern:hover .popular-header i {
    transform: translate(4px, -4px);
}

.popular-desc {
    font-size: 0.95rem;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

.popular-tag {
    display: inline-block;
    background: #ede9fe;
    color: #7c3aed;
    padding: 0.375rem 0.875rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
}

.view-all-container {
    text-align: center;
}

.view-all-btn-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: #1f2937;
    color: #ffffff;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    font-size: 1.05rem;
    transition: all 0.3s ease;
}

.view-all-btn-modern:hover {
    background: #111827;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.view-all-btn-modern i {
    transition: transform 0.3s ease;
}

.view-all-btn-modern:hover i {
    transform: translateX(4px);
}

/* Modern Footer */
.footer-modern {
    background: #0A2E6E;
    color: #ffffff;
    padding: 4rem 0 2rem;
}


.footer-content-modern {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-column-modern h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.footer-column-modern ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column-modern ul li {
    margin-bottom: 0.75rem;
}

.footer-column-modern ul li a {
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.footer-column-modern ul li a:hover {
    color: #ffffff;
}

.footer-logo-modern {
    margin-bottom: 1.5rem;
    width: 150px;
    
}

.footer-logo-image {
    height: 100px;
    width: 1536px;
}

.footer-logo-fallback {
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-description {
    color: white;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-social a:hover {

    transform: translateY(-2px);
}

.footer-bottom-modern {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom-modern p {
    color: #ffffff;
    font-size: 0.875rem;
    margin: 0.5rem 0;
}

.footer-bottom-modern i {
    color: #ef4444;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }

    .category-grid-modern {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .about-content-modern {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-content-modern {
        grid-template-columns: repeat(2, 1fr);
    }

    .popular-grid-modern {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .main-header .desktop-nav {
        display: none;
    }

    .hero-section-modern {
        padding: 4rem 0 5rem;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-subtitle {
        font-size: 1.05rem;
    }

    .hero-search-modern {
        flex-direction: column;
        padding: 1rem;
        gap: 0.75rem;
    }

    .hero-search-modern .search-icon {
        display: none;
    }

    .hero-search-input-modern {
        width: 100%;
        padding: 0.5rem 0;
    }

    .hero-search-btn-modern {
        width: 100%;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .category-section-modern,
    .about-section-modern,
    .popular-section-modern {
        padding: 4rem 0;
    }

    .section-title-modern {
        font-size: 2rem;
    }

    .category-grid-modern {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .popular-grid-modern {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content-modern {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 600px) {
    .popular-grid-modern {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.875rem;
    }

    .section-title-modern {
        font-size: 1.75rem;
    }

    .about-title-modern {
        font-size: 2rem;
    }
}

/* Finance Page Layout with Sidebar */
.finance-page-wrapper {
    display: flex;
    max-width: 1350px;
    margin: 20px auto;
    gap: 20px;
    align-items: flex-start;
    padding: 0 15px;
}

.finance-main-content {
    flex: 1;
    min-width: 0;
    /* Prevent flex overflow */
}

/* Sidebar Ad Styles */
.ad-sidebar {
    width: 300px;
    flex-shrink: 0;
    min-height: 600px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-weight: 500;
    text-align: center;
    position: sticky;
    top: 20px;
}

/* Responsive Sidebar */
@media (max-width: 1024px) {
    .finance-page-wrapper {
        flex-direction: column !important;
    }

    .ad-sidebar {
        width: 100% !important;
        height: auto;
        min-height: 100px;
        padding: 40px 0;
        position: static;
        margin-top: 30px;
    }

    .finance-main-content {
        width: 100% !important;
    }
}

/* Search Autocomplete Styles */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.search-result-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #f9fafb;
}

.result-name {
    font-weight: 500;
    color: #1f2937;
    font-size: 0.95rem;
}

.result-category {
    font-size: 0.8rem;
    color: #6b7280;
    background-color: #f3f4f6;
    padding: 2px 8px;
    border-radius: 12px;
}