/* Modern CSS for FreeScienceProject.com */

/*
    ===================================================================
    FreeScienceProject - modern-styles.css
    - Purpose: central site styles, components, utilities, and project page styles.
    - Note: This file is organized into logical sections to make maintenance easier.

    TABLE OF CONTENTS (major sections)
    1. Reset & Base
    2. Variables
    3. Typography
    4. Layout Components (container, hero)
    5. Navigation
    6. Cards & Grid
    7. Grade levels
    8. Buttons
    9. Sections & Utilities
 10. Footer
 11. Schema / Breadcrumb
 12. Responsive Rules
 13. Accessibility / Print
 14. Loading states
 15. Search & Filter UI
 16. FAQ, Badges, Misc
 17. Scroll-to-top
 18. Conversational Intro
 19. Project pages styling
 20. Section footer styles

    Important: Prefer small, non-destructive edits when updating styles.
    ===================================================================
*/

/* -------------------------------------------------------------------
     1) RESET & BASE
     ------------------------------------------------------------------- */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2d6a4f;         /* Verde bosque profundo */
    --secondary-color: #40916c;       /* Verde medio científico */
    --accent-color: #52b788;          /* Verde claro natural */
    --tertiary-color: #2e86ab;        /* Azul científico */
    --quaternary-color: #a8dadc;      /* Azul claro suave */
    --text-dark: #1d1d1f;
    --text-light: #74a57f;            /* Verde grisáceo para texto secundario */
    --background-light: #f8fffe;      /* Fondo ligeramente verdoso */
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(45, 106, 79, 0.15);  /* Sombra verdosa suave */
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-light);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--primary-color);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--primary-color);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 2rem);
}

p {
    margin-bottom: 1em;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Layout Components */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--tertiary-color) 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--white);
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Navigation */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.logo img {
    height: auto;
    max-width: 300px;
    transition: var(--transition);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
}

.nav-links a:hover {
    background-color: var(--background-light);
    color: var(--primary-color);
}

/* Cards and Project Grid */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin: 3rem 0;
}

/* Grade levels grid - force 4 columns on desktop */
.grade-levels .projects-grid {
    grid-template-columns: repeat(4, 1fr);
}

.project-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.project-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.project-card p {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.grade-badge {
    background: var(--accent-color);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.difficulty-badge {
    background: var(--secondary-color);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Project Cards with Shop Widget Layout */
.project-card.with-shop-widget {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: relative;
}

.project-card.with-shop-widget:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.project-main-content {
    padding: 2rem;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.project-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
}

.project-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.project-content {
    margin-bottom: 1.5rem;
}

.project-title {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.project-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.tag {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.materials-tag {
    background: rgba(52, 199, 89, 0.1);
    color: var(--accent-color);
}

.grade-tag {
    background: rgba(44, 90, 160, 0.1);
    color: var(--primary-color);
}

.subject-badge {
    background: rgba(255, 107, 53, 0.1);
    color: var(--secondary-color);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: capitalize;
}

.popular-badge {
    position: absolute;
    right: 1rem;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #8b6914;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.project-actions {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
}

.project-actions .btn-primary {
    flex-shrink: 0;
    white-space: nowrap;
    align-self: flex-end;
    min-width: 120px;
    justify-content: center;
    text-align: center;
}

.related-supplies-section {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.related-supplies-section h4 {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.project-card.with-shop-widget {
    position: relative;
}

/* Related Supplies styling - ONLY for category pages, NOT for individual project pages */
.page-layout .abantecart-widget-container,
body:not(.project-page) .abantecart-widget-container {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Individual project pages - preserve original AbanteCart styles */
body.project-page .abantecart-widget-container {
    /* Reset all custom styling to allow AbanteCart's native styles */
    all: unset;
    list-style: none;
    display: block;
}

body.project-page .abantecart-widget-container li {
    /* Reset all custom styling to allow AbanteCart's native styles */
    all: unset;
    list-style: none;
    display: list-item;
    cursor: pointer;
}

body.project-page .abantecart-widget-container h3,
body.project-page .abantecart-widget-container h3.abantecart_name,
body.project-page .abantecart-widget-container h3.abantecart_name a {
    /* Reset all custom styling to allow AbanteCart's native styles */
    all: unset;
    cursor: pointer;
}

.page-layout .abantecart-widget-container li,
body:not(.project-page) .abantecart-widget-container li {
    margin-bottom: 0;
    padding: 0.3rem 0.2rem;
    background: #f8f9ff;
    border-radius: 6px;
    border: 1px solid #e6e9ff;
    transition: var(--transition);
    cursor: pointer;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
    text-decoration: none;
    font-size: 0.75rem;
}

.page-layout .abantecart-widget-container li:hover,
body:not(.project-page) .abantecart-widget-container li:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(44, 90, 160, 0.15);
    background: #f0f3ff;
    border-color: #d1d9ff;
}

.page-layout .abantecart-widget-container li:active,
body:not(.project-page) .abantecart-widget-container li:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(44, 90, 160, 0.2);
}

.page-layout .abantecart-widget-container h3,
body:not(.project-page) .abantecart-widget-container h3 {
    font-size: 0.75rem;
    margin: 0;
    color: #1e3a5f;
    line-height: 1.1;
    font-weight: 600;
    text-align: center;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    pointer-events: none;
    user-select: none;
}

.page-layout .abantecart-widget-container h3.abantecart_name,
body:not(.project-page) .abantecart-widget-container h3.abantecart_name {
    font-size: 0.75rem !important;
    margin: 0;
    padding: 0;
    line-height: 1.1;
    font-weight: 600;
}

.page-layout .abantecart-widget-container h3.abantecart_name a,
body:not(.project-page) .abantecart-widget-container h3.abantecart_name a {
    font-size: 0.75rem !important;
    color: #1e3a5f;
    text-decoration: none;
    display: block;
    line-height: 1.1;
    font-weight: 600;
}

.page-layout .abantecart-widget-container li,
body:not(.project-page) .abantecart-widget-container li {
    margin-bottom: 0;
    padding: 0.75rem 0.5rem;
    background: #f8f9ff;
    border-radius: 8px;
    border: 1px solid #e6e9ff;
    transition: var(--transition);
    cursor: pointer;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 45px;
}

/* Responsive layouts - ONLY for category pages, NOT for individual project pages */
@media (max-width: 1024px) {
    .page-layout .abantecart-widget-container,
    body:not(.project-page) .abantecart-widget-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
    }
}

@media (max-width: 900px) {
    .page-layout .abantecart-widget-container li,
    body:not(.project-page) .abantecart-widget-container li {
        font-size: 0.64rem;
    }
    
    .page-layout .abantecart-widget-container h3,
    body:not(.project-page) .abantecart-widget-container h3 {
        font-size: 0.64rem;
    }
    
    .page-layout .abantecart-widget-container h3.abantecart_name,
    body:not(.project-page) .abantecart-widget-container h3.abantecart_name {
        font-size: 0.64rem !important;
    }
    
    .page-layout .abantecart-widget-container h3.abantecart_name a,
    body:not(.project-page) .abantecart-widget-container h3.abantecart_name a {
        font-size: 0.64rem !important;
    }
}

@media (max-width: 768px) {
    .project-actions {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .page-layout .abantecart-widget-container,
    body:not(.project-page) .abantecart-widget-container {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        padding: 0;
    }
    
    .page-layout .abantecart-widget-container li,
    body:not(.project-page) .abantecart-widget-container li {
        flex: none;
        width: 100%;
        margin: 0;
        padding: 0.75rem 0.5rem;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        font-size: 0.64rem;
    }
    
    .page-layout .abantecart-widget-container h3,
    body:not(.project-page) .abantecart-widget-container h3 {
        font-size: 0.64rem;
        line-height: 1.2;
        text-align: center;
    }
    
    .page-layout .abantecart-widget-container h3.abantecart_name,
    body:not(.project-page) .abantecart-widget-container h3.abantecart_name {
        font-size: 0.64rem !important;
        line-height: 1.1;
    }
    
    .page-layout .abantecart-widget-container h3.abantecart_name a,
    body:not(.project-page) .abantecart-widget-container h3.abantecart_name a {
        font-size: 0.64rem !important;
        line-height: 1.1;
    }
}

@media (max-width: 480px) {
    .page-layout .abantecart-widget-container,
    body:not(.project-page) .abantecart-widget-container {
        display: flex;
        flex-direction: column;
        gap: 0.4rem;
        padding: 0;
    }
    
    .page-layout .abantecart-widget-container li,
    body:not(.project-page) .abantecart-widget-container li {
        flex: none;
        width: 100%;
        margin: 0;
        padding: 0.6rem 0.4rem;
        min-height: auto;
        border-radius: 6px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        font-size: 0.525rem;
    }
    
    .project-main-content {
        padding: 1.5rem;
    }
    
    .related-supplies-section h4 {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }
    
    .abantecart-widget-container h3 {
        font-size: 0.525rem;
        line-height: 1.1;
        text-align: center;
    }
    
    .abantecart-widget-container h3.abantecart_name {
        font-size: 0.525rem !important;
        line-height: 1.0;
    }
    
    .abantecart-widget-container h3.abantecart_name a {
        font-size: 0.525rem !important;
        line-height: 1.0;
    }
}

/* End of project cards section */

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: #1e3a5f;
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background: #e55a2b;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Sections */
.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.featured-projects {
    background: var(--white);
    padding: 4rem 0;
}

.grade-levels {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 4rem 0;
}

.grade-level-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.grade-level-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.grade-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--tertiary-color));
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    position: relative;
    overflow: hidden;
}

.grade-icon::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    transition: var(--transition);
}

.grade-level-card:hover .grade-icon::after {
    animation: shine 1s ease-in-out;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Center button in grade level cards */
.grade-level-card .project-meta {
    justify-content: center;
    text-align: center;
}

/* Grade level specific content */
.grade-icon.primary {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
}

.grade-icon.primary::before {
    content: 'K-4';
}

.grade-icon.elementary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.grade-icon.elementary::before {
    content: '4-6';
}

.grade-icon.intermediate {
    background: linear-gradient(135deg, var(--secondary-color), var(--tertiary-color));
}

.grade-icon.intermediate::before {
    content: '7-8';
}

.grade-icon.senior {
    background: linear-gradient(135deg, var(--tertiary-color), var(--primary-color));
}

.grade-icon.senior::before {
    content: '9-12';
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #333;
    color: #ccc;
}

.footer-bottom a {
    color: #ccc;
    text-decoration: none;
    transition: var(--transition);
}

.footer-bottom a:hover {
    color: var(--white);
}

/* Schema.org structured data styling */
.breadcrumb {
    background: var(--white);
    padding: 0.25rem 0 0.6rem 0;
    font-size: 0.85rem;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.6rem 0;
    }
    
    .logo img {
        max-width: 225px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .project-card {
        padding: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .hero-section {
        padding: 1.5rem 0;
    }
    
    .project-card {
        padding: 1rem;
    }
    
    .section {
        padding: 2rem 0;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .btn {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .project-card {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }
}

/* 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 var(--primary-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Search and filter components */
.search-container {
    background: var(--white);
    padding: 2rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid #e1e5e9;
    border-radius: 50px;
    font-size: 1.1rem;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.filter-tab:hover,
.filter-tab.active {
    background: var(--primary-color);
    color: var(--white);
}

/* FAQ Section */
.faq-section {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.faq-question {
    background: var(--background-light);
    padding: 1.5rem;
    margin: 0;
    cursor: pointer;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    outline: none;
}

/* Ensure button styling is consistent */
button.faq-question {
    background: var(--background-light);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
}

/* Ensure h4 styling is consistent */
h4.faq-question {
    background: var(--background-light);
    margin: 0;
    padding: 1.5rem;
}

.faq-question:hover {
    background: #e9ecef;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    transition: var(--transition);
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 1.5rem;
    display: none !important;
    line-height: 1.6;
}

.faq-item.active .faq-answer {
    display: block !important;
}

/* Kit availability badge */
.kit-available {
    background: var(--accent-color);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

/* Section subtitle */
.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.2rem;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero buttons */
.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Disclaimer styling */
.disclaimer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #333;
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.5;
}

/* Related topics and educational context */
.related-topics,
.educational-context,
.practical-applications {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin: 2rem 0;
    box-shadow: var(--shadow);
}

.related-topics h3,
.educational-context h3,
.practical-applications h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.related-topics ul,
.practical-applications ul {
    list-style: none;
    padding: 0;
}

.related-topics li,
.practical-applications li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.related-topics li:last-child,
.practical-applications li:last-child {
    border-bottom: none;
}

/* Social links */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Voice search optimization (hidden) */
.voice-search-optimization,
.local-voice-optimization {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top:hover {
    background: #1e3a5f;
    transform: translateY(0);
    box-shadow: 0 6px 20px rgba(44, 90, 160, 0.4);
}

.scroll-to-top.visible {
    opacity: 0.8;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top.visible:hover {
    opacity: 1;
}

.scroll-to-top svg {
    transition: transform 0.2s ease;
}

.scroll-to-top:hover svg {
    transform: translateY(-2px);
}

/* Conversational intro */
.conversational-intro {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary-color);
    font-style: italic;
    color: var(--text-dark);
}

/* Project pages styling */
.--------------------------------------------------------------------
/* --------------------------------------------------------------------
   PROJECT PAGE STYLES
   These rules apply to individual project pages and related components.
   Keep project-specific rules grouped here.
   -------------------------------------------------------------------- */
.project-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Lightweight project title used for legacy pages that keep original layout */
.project-title-simple {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 1.25rem;
    color: var(--text-dark);
    font-weight: 600;
    text-align: center;
    margin: 0 0 0.75rem 0;
}

.project-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a5f 100%);
    color: white;
    border-radius: 12px;
}

.project-header h1 {
    color: white;
    margin-bottom: 1rem;
}

.project-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0;
    padding: 1rem;
    background: var(--background-light);
    border-radius: 8px;
}

.project-nav-links {
    display: flex;
    gap: 1rem;
}

.project-nav-links a {
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: var(--transition);
}

.project-nav-links a:hover {
    background: var(--primary-color);
    color: white;
}

.project-main {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.related-projects {
    background: var(--background-light);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.related-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.safety-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.safety-notice h4 {
    color: #856404;
    margin-bottom: 1rem;
}

.safety-notice p {
    color: #856404;
    margin: 0;
}

.subject-badge {
    background: var(--secondary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

/* Enhanced responsive design */
@media (max-width: 1024px) {
    .hero-title {
        font-size: clamp(2rem, 5vw, 3rem);
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    /* Grade levels responsive - 2 columns on tablets */
    .grade-levels .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .project-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .project-nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-tabs {
        justify-content: center;
        gap: 0.5rem;
    }
    
    .filter-tab {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .faq-question {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .faq-answer {
        padding: 1rem;
    }
    
    /* Grade levels responsive - single column on mobile */
    .grade-levels .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .project-card {
        padding: 1rem;
    }
    
    .filter-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .scroll-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 2.5rem;
        height: 2.5rem;
    }
}

/* =============================================================================
   SECTION FOOTER - FIXED BOTTOM GLOBAL STYLES
   Additional styles for the fixed footer used in project pages
   ============================================================================= */

/* Global Section Footer Base Styles */
.section-footer {
    font-family: inherit;
}

/* Ensure the footer links match the site design */
.section-footer .footer-nav-link {
    font-family: inherit;
    transition: var(--transition);
}

.section-footer .footer-nav-link:hover {
    text-decoration: none;
}

/* Ensure scroll progress uses site accent color */
.section-footer .scroll-progress {
    background: var(--accent-color);
}

/* Make sure footer colors use the site palette */
.section-footer .footer-brand {
    color: var(--primary-color);
}

.section-footer .stats-number {
    color: var(--primary-color);
}

/* Adjust z-index to work with existing site components */
.section-footer {
    z-index: 60;
}

/* Emergency: hide project header blocks when includes are removed or for legacy pages
   This prevents a large project header from appearing if some pages still output the markup.
   Remove this rule if you later want project headers to display again. */
.project-header {
    display: none !important;
}

/* Hide conversational intro globally (generated by JS for SEO hints) */
.conversational-intro {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* =============================================================================
   PROJECTS LAYOUT CSS - MERGED FROM projects-layout.css
   ============================================================================= */

/* Fixed Side Panel Layout */
.page-layout {
    display: flex;
    min-height: calc(100vh - 85px); /* Account for more compact navbar + breadcrumb */
    background: var(--background-light);
}

/* Fixed Left Side Panel - Filters */
.filter-panel {
    position: fixed;
    left: 0;
    top: 120px; /* Adjust for more compact navbar + breadcrumb height */
    width: 280px;
    height: calc(100vh - 120px);
    background: var(--white);
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    z-index: 50;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

/* Panel Header */
.panel-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 1;
}

.panel-header h2 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.panel-subtitle {
    font-size: 0.8rem;
    opacity: 0.9;
    margin: 0;
}

/* Panel Content */
.panel-content {
    padding: 1rem;
}

/* Main Content Area */
.main-content-area {
    flex: 1;
    margin-left: 280px;
    padding: 1.5rem;
    max-width: calc(100vw - 280px);
    margin-top: 0; /* No extra margin needed as navbar is sticky */
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 85px);
}

/* Search Box */
.search-container {
    margin-bottom: 1.25rem;
}

.search-box {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: border-color 0.3s ease;
    background: var(--white);
}

.search-box:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}/* Projects Layout CSS - Shared across all project category pages */
/* Fixed Side Panel Layout for Primary, Elementary, Intermediate, and Senior Projects */

/* Fixed Side Panel Layout */
.page-layout {
    display: flex;
    min-height: calc(100vh - 85px); /* Account for more compact navbar + breadcrumb */
    background: var(--background-light);
}

/* Page wrapper to contain everything after navbar */
body {
    margin: 0;
    padding: 0;
}

/* Fixed Left Side Panel - Filters */
.filter-panel {
    position: fixed;
    left: 0;
    top: 120px; /* Adjust for more compact navbar + breadcrumb height */
    width: 280px;
    height: calc(100vh - 120px);
    background: var(--white);
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    z-index: 50;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

/* Panel Header */
.panel-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 1;
}

.panel-header h2 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.panel-subtitle {
    font-size: 0.8rem;
    opacity: 0.9;
    margin: 0;
}

/* Panel Content */
.panel-content {
    padding: 1rem;
}

/* Main Content Area */
.main-content-area {
    flex: 1;
    margin-left: 280px;
    padding: 1.5rem;
    max-width: calc(100vw - 280px);
    margin-top: 0; /* No extra margin needed as navbar is sticky */
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 85px);
}

/* Search Box */
.search-container {
    margin-bottom: 1.25rem;
}

.search-box {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: border-color 0.3s ease;
    background: var(--white);
}

.search-box:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

/* Filter Sections */
.filter-section {
    margin-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 0.75rem;
}

.filter-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.filter-section h3 {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.filter-section h3::before {
    content: '';
    width: 3px;
    height: 12px;
    background: var(--accent-color);
    border-radius: 1px;
}

/* Filter Options */
.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.4rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.filter-option:hover {
    background: var(--background-light);
    border-color: #e9ecef;
}

.filter-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--primary-color);
}

.filter-option label {
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-dark);
    flex: 1;
    line-height: 1.1;
    font-weight: 400;
}

.filter-option:has(input:checked) {
    background: rgba(44, 90, 160, 0.1);
    border-color: var(--primary-color);
}

.filter-option:has(input:checked) label {
    color: var(--primary-color);
    font-weight: 500;
}

/* Action Buttons */
.panel-actions {
    padding: 1rem;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    position: sticky;
    bottom: 0;
}

.clear-filters {
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.clear-filters:hover {
    background: #e55a2b;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 0.75rem;
    padding: 0.4rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.back-link:hover {
    background: rgba(44, 90, 160, 0.1);
}

/* Main Content */
.content-container {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.75rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    flex: 1;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e9ecef;
}

.results-count {
    color: #666;
    font-size: 0.9rem;
}

.sort-options select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.project-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    border-left: 3px solid var(--primary-color, #2c5aa0);
}

.project-item:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.project-item-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.3s ease;
}

.project-item-link:hover {
    text-decoration: none;
    color: inherit;
}

.project-item-link:hover .project-item {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.project-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--primary-color, #2c5aa0);
    line-height: 1.4;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.project-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.6rem;
}

.project-description {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.4;
}

.subject-tag {
    background: var(--accent-color, #34c759);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.difficulty-tag {
    background: var(--secondary-color, #ff6b35);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Mobile Filter Toggle Button */
.mobile-filter-toggle {
    position: fixed;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 99;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    display: none; /* Hidden by default, shown only on mobile */
}

/* States for different status */
.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.no-results h3 {
    margin-bottom: 1rem;
    color: #333;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .filter-panel {
        width: 260px;
    }
    
    .main-content-area {
        margin-left: 260px;
        max-width: calc(100vw - 260px);
        padding: 1.25rem;
    }
}

@media (max-width: 768px) {
    .filter-panel {
        top: 75px; /* Adjust for more compact mobile navbar + breadcrumb height */
        height: calc(100vh - 75px);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 99; /* Higher z-index for mobile overlay */
    }
    
    .filter-panel.mobile-open {
        transform: translateX(0);
    }
    
    /* Mobile overlay when panel is open */
    .filter-panel.mobile-open::after {
        content: '';
        position: fixed;
        top: 75px;
        left: 280px;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.3);
        z-index: 98;
    }
    
    .main-content-area {
        margin-left: 0;
        max-width: 100vw;
        padding: 0.75rem;
    }
    
    .mobile-filter-toggle {
        display: flex; /* Show on mobile */
    }
    
    .results-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
}

@media (min-width: 769px) {
    .mobile-filter-toggle {
        display: none;
    }
}

/* =============================================================================
   SECTION FOOTER - FIXED BOTTOM
   ============================================================================= */

/* Fixed Section Footer for Project Pages */
.section-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    min-height: 45px; /* Compact single line footer */
    background: var(--white);
    border-top: 2px solid var(--primary-color);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    z-index: 60; /* Higher than filter panel */
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

/* When disclaimer is expanded */
.section-footer.disclaimer-open {
    min-height: 115px; /* Smaller expansion for simplified footer */
}

/* Footer Legal Information Bar - Now the main and only content */
.footer-legal {
    background: var(--white);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    margin-left: 280px; /* Account for fixed sidebar */
    flex: 1;
}

.legal-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.copyright {
    color: #666;
    font-weight: 500;
}

.legal-separator {
    color: #ccc;
}

.legal-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.legal-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Disclaimer Toggle Button */
.disclaimer-toggle {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.3s ease;
}

.disclaimer-toggle:hover {
    background: #e55a2b;
    transform: translateY(-1px);
}

.disclaimer-icon {
    font-size: 0.8rem;
}

/* Footer Disclaimer Section */
.footer-disclaimer {
    background: #fff3cd;
    border-top: 1px solid #ffeaa7;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-left: 280px; /* Account for fixed sidebar */
}

.footer-disclaimer.expanded {
    max-height: 80px;
    padding: 0.75rem 1rem;
}

.disclaimer-content {
    font-size: 0.65rem;
    color: #856404;
    line-height: 1.4;
}

.disclaimer-content strong {
    color: #533f03;
}



/* Scroll Progress Indicator */
.scroll-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.1s ease;
    z-index: 1;
}

/* Adjust main content area to account for fixed footer */
.main-content-area {
    padding-bottom: 65px; /* Account for compact footer height + some spacing */
    margin-bottom: 0;
}

/* Adjust page layout for fixed footer */
.page-layout {
    min-height: calc(100vh - 85px - 45px); /* Account for navbar + footer */
}

/* Adjust filter panel for fixed footer */
.filter-panel {
    height: calc(100vh - 120px - 45px); /* Account for navbar + footer */
}

/* Mobile Responsive Adjustments */
@media (max-width: 1024px) {
    .footer-legal {
        margin-left: 260px;
        font-size: 0.7rem;
    }
    
    .footer-disclaimer {
        margin-left: 260px;
    }
}

@media (max-width: 768px) {
    .section-footer {
        min-height: 50px; /* Compact mobile footer */
    }
    
    .section-footer.disclaimer-open {
        min-height: 120px; /* Smaller expansion on mobile */
    }
    
    .footer-legal {
        margin-left: 0;
        padding: 0.6rem 0.75rem;        
        gap: 0.4rem;       
        font-size: 0.65rem;
    }
    
    .footer-disclaimer {
        margin-left: 0;
    }
    
    .footer-disclaimer.expanded {
        max-height: 70px; /* Smaller on mobile */
    }
    
    .disclaimer-toggle {
        font-size: 0.6rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* Adjust content area for mobile footer */
    .main-content-area {
        padding-bottom: 70px; /* Adjust for mobile footer */
    }
    
    /* Adjust filter panel for mobile footer */
    .filter-panel {
        height: calc(100vh - 75px - 50px); /* Account for mobile navbar + footer */
    }
}

@media (max-width: 480px) {
    .legal-text {
        flex-direction: column;
        gap: 0.2rem;
        font-size: 0.6rem;
    }
    
    .legal-separator {
        display: none; /* Hide separators on very small screens */
    }
    
    .disclaimer-content {
        font-size: 0.6rem;
    }
}

/* =============================================================================
   SAFETY NOTICE SECTION
   ============================================================================= */

/* Safety Notice for Project Pages */
.safety-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.safety-notice h4 {
    color: #856404;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.safety-notice p {
    color: #856404;
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.3;
}

/* Mobile responsive adjustments for safety notice */
@media (max-width: 768px) {
    .safety-notice {
        padding: 0.6rem;
        margin-bottom: 0.75rem;
    }
    
    .safety-notice h4 {
        font-size: 0.85rem;
    }
    
    .safety-notice p {
        font-size: 0.8rem;
    }
}

/* Projects Directory Specific Styles */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a5f 100%);
    color: var(--white);
    padding: 3rem 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
    color: white !important;
}

.hero-section p {
    font-size: 1.3rem;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.4;
    color: white !important;
}


.featured-projects {
    margin-bottom: 3rem;
}

.featured-project {
    border-radius: 15px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2.5rem;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.featured-project:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.featured-project h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.3;
}

.featured-project p {
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #444;
}

.featured-project img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.featured-project img:hover {
    transform: scale(1.02);
}

.featured-project a {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.3);
}

.featured-project a:hover {
    background: #1e3a5f;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(44, 90, 160, 0.4);
}

/* Grade Level Navigation Cards */
.content-container a[href*="projects.php"] {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a5f 100%);
    color: var(--white);
    padding: 2rem;
    border-radius: 12px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    display: block;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.content-container a[href*="projects.php"]:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.2);
}

.content-container a[href*="projects.php"] h3 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.content-container a[href*="projects.php"] p {
    opacity: 0.9;
    font-size: 1rem;
    margin: 0;
}

/* Enhanced project item styling for directory */
.project-item {
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

.project-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.project-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.subject-tag, .grade-tag {
    background: rgba(255,255,255,0.95);
    color: var(--primary-color);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(44, 90, 160, 0.2);
}

.project-description {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #555;
}

/* =============================================================================
   PROJECT CARDS - ENHANCED STYLING FOR SEARCH RESULTS
   ============================================================================= */

/* Project Card Layout */
.project-card {
    background: var(--white);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-left: 4px solid var(--primary-color);
}

.project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    border-left-color: var(--secondary-color);
}

/* Popular Badge */
.popular-badge {
    position: absolute;    
    right: 1rem;
    background: var(--secondary-color);
    color: var(--white);
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

/* Project Header */
.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.project-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--white);
    background: var(--primary-color);
}

.project-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.project-grade {
    background: var(--accent-color);
    color: var(--white);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

.project-difficulty {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

.project-difficulty.easy {
    background: #d4edda;
    color: #155724;
}

.project-difficulty.medium {
    background: #fff3cd;
    color: #856404;
}

.project-difficulty.hard {
    background: #f8d7da;
    color: #721c24;
}

/* Project Content */
.project-content {
    margin-bottom: 1.5rem;
}

.project-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.project-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}

/* Project Tags */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.tag {
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: capitalize;
}

.subject-tag {
    background: rgba(44, 90, 160, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(44, 90, 160, 0.2);
}

.materials-tag {
    background: rgba(52, 199, 89, 0.1);
    color: var(--accent-color);
    border: 1px solid rgba(52, 199, 89, 0.2);
}

.grade-tag {
    background: rgba(255, 107, 53, 0.1);
    color: var(--secondary-color);
    border: 1px solid rgba(255, 107, 53, 0.2);
}

/* Status Tags - FEATURED, POPULAR, NEW */
.status-tag {
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-left: 0.5rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.status-tag.featured {
    background: linear-gradient(135deg, var(--tertiary-color) 0%, var(--primary-color) 100%);
    color: var(--white);
    box-shadow: 0 2px 6px rgba(46, 134, 171, 0.3);
}

.status-tag.popular {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    box-shadow: 0 2px 6px rgba(64, 145, 108, 0.3);
}

.status-tag.new {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    box-shadow: 0 2px 6px rgba(82, 183, 136, 0.3);
}

.status-tag.kit {
    background: linear-gradient(135deg, var(--tertiary-color) 0%, var(--quaternary-color) 100%);
    color: var(--white);
    box-shadow: 0 2px 6px rgba(46, 134, 171, 0.3);
}

/* Inline status tags within project titles */
.project-title .status-tag {
    margin-left: 0.5rem;
    font-size: 0.6rem;
    padding: 0.15rem 0.4rem;
    vertical-align: middle;
}

/* Project Actions */
.project-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: #1e3a5f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.3);
    text-decoration: none;
    color: var(--white);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
}

/* Action Icons */
.action-icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* Kit Available Indicator */
.kit-indicator {
    background: var(--secondary-color);
    color: var(--white);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Grade Level Icons */
.grade-icon {   
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;    
    color: var(--white);
    text-align: center;
    line-height: 1;
}

.grade-icon.primary {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
}

.grade-icon.elementary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.grade-icon.intermediate {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--tertiary-color) 100%);
}

.grade-icon.senior {
    background: linear-gradient(135deg, var(--tertiary-color) 0%, var(--primary-color) 100%);
}

/* Mobile responsiveness for projects directory */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 1.5rem;
    }
    
    .hero-section h1 {
        font-size: 2.2rem;
    }
    
    .hero-section p {
        font-size: 1.1rem;
    }
    
    .featured-project {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 2rem;
        gap: 1.5rem;
    }
    
    .featured-project img {
        order: -1;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .featured-project h3 {
        font-size: 1.4rem;
    }
    
    /* Project cards mobile adjustments */
    .project-card {
        padding: 1.25rem;
    }
    
    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .project-meta {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }
    
    .project-tags {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    
    .project-actions {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .btn-primary, .btn-secondary {
        text-align: center;
        justify-content: center;
        width: 100%;
        display: flex;
    }
    
    .status-tag {
        display: block;
        margin: 0.25rem 0;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .featured-project {
        padding: 1.5rem;
    }
    
    .featured-project h3 {
        font-size: 1.25rem;
    }
    
    /* Enhanced mobile project cards */
    .project-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .project-icon {
        width: 32px;
        height: 32px;
        font-size: 0.7rem;
    }
    
    .project-title {
        font-size: 1rem;
    }
    
    .project-description {
        font-size: 0.85rem;
    }
    
    .tag {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }
    
    .status-tag {
        font-size: 0.6rem;
        padding: 0.15rem 0.4rem;
    }
    
    .btn-primary, .btn-secondary {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        text-align: center;
        justify-content: center;
    }
    
    .popular-badge {
        font-size: 0.65rem;
        padding: 0.25rem 0.6rem;        
        right: 0.75rem;
    }
}

/* Scroll to Top Button Styles */
.scroll-to-top {
    position: fixed;
    bottom: 100px; /* Position above section footer */
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.3);
    transition: all 0.3s ease;
    z-index: 55; /* Above section footer but below mobile filters */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
}

.scroll-to-top:hover {
    background: #1e3a5f;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(44, 90, 160, 0.4);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Mobile adjustments for scroll to top button */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 120px; /* Adjust for mobile footer height */
        right: 1rem;
        width: 44px;
        height: 44px;
    }
    
    .scroll-to-top svg {
        width: 20px;
        height: 20px;
    }
}

/* Educational Value Section */
.educational-value-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

.educational-value-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(44, 90, 160, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(255, 107, 53, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.educational-value-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
}

.educational-value-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.educational-value-content > p {
    font-size: 1.2rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.value-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.value-item {
    background: rgba(255, 255, 255, 0.8);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    text-align: left;
}

.value-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.9);
}

.value-item h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.value-item h3::before {
    content: '✓';
    display: inline-block;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    font-size: 0.9rem;
    font-weight: bold;
}

.value-item p {
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .educational-value-content h2 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .educational-value-content > p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .value-highlights {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    .value-item {
        padding: 1.5rem;
    }
    
    .value-item h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .educational-value-content h2 {
        font-size: 1.75rem;
    }
    
    .educational-value-content > p {
        font-size: 1rem;
    }
    
    .value-item {
        padding: 1.25rem;
    }
}

/* Section CTA button styling */
.section-cta .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(44, 90, 160, 0.3);
    border: none;
    cursor: pointer;
}

.section-cta .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(44, 90, 160, 0.4);
    background: linear-gradient(135deg, #1e3a5f, #e55100);
    text-decoration: none;
    color: white;
}

.section-cta .btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(44, 90, 160, 0.3);
}

@media (max-width: 768px) {
    .section-cta .btn-primary {
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
    }
}

/* Active search styling for projects page */
.search-box.search-active,
#search-projects.search-active {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1) !important;
    background: #f8f9ff !important;
}

/* Search results highlighting */
.project-card.search-match {
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(44, 90, 160, 0.15);
}

.project-card.search-match .project-title {
    color: var(--primary-color);
    font-weight: 700;
}

/* Filter Icon for Mobile Toggle */
.filter-icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    position: relative;
}

.filter-icon::before {
    content: "";
    position: absolute;
    width: 3px;
    height: 14px;
    background: currentColor;
    left: 50%;
    top: 3px;
    transform: translateX(-50%);
    border-radius: 1px;
}

.filter-icon::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    border: 2px solid currentColor;
    border-radius: 50%;
    left: 50%;
    bottom: 1px;
    transform: translateX(-50%);
    background: transparent;
}

/* Popular Badge CSS (no emoji) */
.popular-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0 8px 0 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

/* Projects Index Page Specific Styles */
body:has([id="projects-container"]) .projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

body:has([id="projects-container"]) .project-card {
    background: white;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

body:has([id="projects-container"]) .project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

/* Project cards without Related Supplies (catalog page) */
body:has([id="projects-container"]) .project-card:not(.with-shop-widget) {
    min-height: auto;
}

body:has([id="projects-container"]) .project-card:not(.with-shop-widget) .project-actions {
    padding: 1rem;
    text-align: center;
}

body:has([id="projects-container"]) .project-card:not(.with-shop-widget) .btn-primary {
    width: 100%;
    justify-self: center;
    justify-content: center;
    text-align: center;
}
