/* Base styles */
:root {
    --primary-color: #4a6bdf;
    --secondary-color: #6dc993;
    --dark-color: #333;
    --light-color: #f8f9fa;
    --text-color: #444;
    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Open Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Enhanced base styles */
body {
    font-family: var(--font-secondary);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
    overflow-x: hidden; /* Prevent horizontal overflow from animations */
}

.container {
    width: 85%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-primary);
    margin-bottom: 1rem;
    color: var(--dark-color);
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

/* Enhanced header */
header {
    background-color: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

header.scrolled {
    padding: 1rem 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header h1 {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0;
}

.tagline {
    color: var(--text-color);
    font-style: italic;
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    color: var(--primary-color);
}

nav ul li a.active {
    color: var(--primary-color);
    font-weight: 700;
}

/* Enhanced hero section */
.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 90vh;
    padding: 6rem 0;
    color: white;
    text-align: center;
}

.hero .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.hero-content {
    flex: 1 1 500px;
    text-align: left;
}

.hero-graphic {
    flex: 1 1 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero h2 {
    color: white;
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero p {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Enhanced features section */
.features {
    padding: 4rem 0;
    background-color: white;
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature {
    text-align: center;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    background: white;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.feature:hover {
    transform: translateY(-15px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature img {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
}

.feature h3 {
    margin: 1rem 0;
    font-size: 1.6rem;
}

.feature p {
    flex: 1;
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: var(--font-primary);
    margin-bottom: 1.5rem; /* Increased bottom margin */
}

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

.btn.primary:hover {
    background-color: #3a5bcf;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(74, 107, 223, 0.4);
}

.btn.secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn.secondary:hover {
    background-color: #5bb983;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(109, 201, 147, 0.4);
}

.btn.mini {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Button groups and containers */
.cta-buttons, 
.action-buttons, 
.card-actions, 
.overlay-buttons,
.social-buttons,
.suggestion-buttons {
    margin-bottom: 2rem; /* Add significant space after button groups */
}

.resource-actions, 
.education-buttons {
    margin-bottom: 1.5rem; /* Spacing after action containers */
}

/* Add spacing specifically for action boxes which contain buttons */
.action-box .btn {
    margin-top: 1rem; /* Increase space between text and buttons */
}

/* AR interface */
.ar-interface {
    padding: 3rem 0;
    background-color: white;
}

.ar-prompt {
    max-width: 600px;
    margin: 0 auto 2rem;
    text-align: center;
}

.input-group {
    display: flex;
    margin: 1rem 0;
}

.input-group input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 50px 0 0 50px;
    font-size: 1rem;
}

.input-group button {
    border-radius: 0 50px 50px 0;
}

.ar-suggestions {
    text-align: center;
    margin-bottom: 2rem;
}

.suggestion-buttons {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* AR content */
.ar-viewer {
    height: 60vh; /* Reduced from 70vh to make the camera preview smaller */
    width: 90%; /* Reduced from 100% to make it narrower */
    max-width: 800px; /* Add maximum width for better control */
    margin: 0 auto; /* Center the viewer */
    position: relative;
    background-color: #000;
    z-index: 10; /* Keep AR content below header */
    overflow: hidden; /* Prevent content from spilling out */
    border-radius: 10px; /* Add rounded corners */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); /* Add subtle shadow */
}

.ar-viewer.hidden {
    display: none;
}

.loading, .error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    text-align: center;
}

.ar-instructions {
    position: absolute;
    bottom: 80px; /* Increased to make room for end button */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    text-align: center;
    max-width: 300px;
    z-index: 200; /* Increased z-index to ensure it's above AR content */
    pointer-events: auto; /* Allow interaction with instructions */
}

.hiro-marker-img {
    width: 150px;
    height: 150px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    background-color: white; /* Ensure white background for marker */
}

.marker-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 15px 0;
    background-color: white;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    pointer-events: auto; /* Ensure clickability */
    position: relative;
    z-index: 201; /* Ensure it's above other elements */
}

.ar-controls {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 15px;
    z-index: 200; /* Ensure controls are above other AR elements */
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    padding: 10px;
}

.panel {
    position: absolute;
    right: 20px;
    top: 80px; /* Position below header */
    background-color: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 10px;
    max-width: 300px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 150; /* Above AR content but below controls */
}

.info-overlay .info-content {
    max-height: 80vh;
    overflow-y: auto;
    margin: 10vh auto;
}

a-scene {
    z-index: 5 !important; /* Prevent A-Frame from taking over all UI */
}

.ar-educational-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 8px;
    max-width: 250px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 120;
}

#marker-info-modal .modal-content {
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    margin: 10vh auto;
}

.loading, .error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    text-align: center;
}

.ar-instructions {
    position: absolute;
    bottom: 80px; /* Increased to make room for end button */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    text-align: center;
    max-width: 300px;
    z-index: 10;
    pointer-events: none; /* Prevents instructions from blocking AR interaction */
}

/* Info overlay */
.info-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.info-overlay.hidden {
    display: none;
}

.info-content {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
}

.fact-box {
    background-color: #f0f7ff;
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    margin: 1.5rem 0;
}

/* Content section */
.content-section {
    padding: 3rem 0;
}

.tab-container {
    margin-top: 2rem;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 600;
    font-family: var(--font-primary);
    color: var(--text-color);
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

.tab-content {
    display: none;
    padding: 1rem 0;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Facts list */
.fact-list li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}

.fact-list li:before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Myths and facts */
.myths-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.myth-fact-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.myth, .fact {
    padding: 1rem;
}

.myth {
    background-color: #fff1f1;
}

.myth h4 {
    color: #d32f2f;
}

.fact {
    background-color: #f1f8e9;
}

.fact h4 {
    color: #689f38;
}

/* Enhanced resources section */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.resource-card {
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    height: 100%;
}

.card-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.resource-card h3 {
    margin: 1rem 0;
    font-size: 1.6rem;
}

.resource-card p {
    flex: 1;
    margin-bottom: 1.5rem;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #333, #222);
    color: white;
    padding: 4rem 0 2rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color), var(--accent-color));
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column h3 {
    color: white;
    margin-bottom: 1.2rem;
    font-size: 1.2rem;
    position: relative;
}

.footer-column h3:after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 0.8rem;
}

.footer-column ul li a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.footer-column ul li a:hover {
    color: var(--primary-color);
}

.footer-column ul li a:hover:before {
    content: '›';
    position: absolute;
    left: -15px;
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    color: white;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.newsletter-form {
    display: flex;
    margin-top: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 0.9rem;
}

.newsletter-form button {
    border-radius: 0 4px 4px 0;
    padding: 10px 15px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: #aaa;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: var(--primary-color);
}

/* Media queries */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }
    
    nav ul {
        margin-top: 1rem;
        justify-content: center;
    }
    
    nav ul li {
        margin: 0 0.75rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .input-group input, .input-group button {
        border-radius: 50px;
        margin-bottom: 0.5rem;
    }
    
    .hero h2 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .hero-content, .hero-graphic {
        flex: 1 1 100%;
        text-align: center;
    }
    
    .hero-content {
        order: 2;
    }
    
    .hero-graphic {
        order: 1;
    }
    
    .floating-icons {
        height: 200px;
        width: 200px;
    }
    
    .icon-bubble {
        width: 60px;
        height: 60px;
    }
    
    .icon-bubble img {
        width: 35px;
        height: 35px;
    }
}

/* Additional CSS for new components */

/* For local resources page */
.search-container {
    display: flex;
    margin-bottom: 20px;
    max-width: 600px;
}

.search-container input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
}

.search-container button {
    border-radius: 0 4px 4px 0;
    margin-left: -1px;
}

.hint {
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
}

.map-container {
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.resource-card.highlighted {
    box-shadow: 0 0 0 2px var(--primary-color);
    transform: translateY(-5px);
}

.detail-item {
    margin-bottom: 10px;
}

.services-list {
    margin-left: 20px;
    margin-top: 5px;
}

.ar-preview {
    max-width: 500px;
    margin: 20px auto;
    border-radius: 8px;
    overflow: hidden;
}

.ar-preview img {
    width: 100%;
    display: block;
}

.disclaimer-box {
    background-color: #f8f9fa;
    border-left: 4px solid var(--warning-color);
    padding: 15px;
    margin: 30px 0;
    border-radius: 4px;
}

/* For resource cards */
.card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.btn-icon:hover {
    background-color: #f0f0f0;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* For action boxes */
.action-box {
    background-color: #f0f7ff;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
    text-align: center;
}

.intro-text {
    font-size: 1.1em;
    max-width: 700px;
    margin: 0 auto 30px;
}

/* Self-help tools */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.tool-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    height: 100%;
}

.tool-content {
    margin-top: 15px;
}

.link-arrow {
    display: inline-block;
    margin-top: 15px;
    font-weight: 600;
    color: var(--primary-color);
}

.link-arrow:after {
    content: " →";
    transition: margin-left 0.3s ease;
}

.link-arrow:hover:after {
    margin-left: 5px;
}

/* Back link for activity details */
.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    color: var(--primary-color);
}

.activity-meta {
    margin-top: 10px;
}

.duration-badge, .type-badge {
    display: inline-block;
    padding: 5px 10px;
    background-color: #eee;
    border-radius: 20px;
    font-size: 0.9em;
    margin-right: 10px;
}

/* Quiz styles */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
}

.question {
    margin-bottom: 30px;
}

.question-text {
    font-size: 1.2em;
    font-weight: 500;
    margin-bottom: 20px;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-btn {
    text-align: left;
    padding: 15px;
    background-color: #f8f9fa;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-btn:hover {
    background-color: #eee;
}

.option-btn.correct {
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.option-btn.incorrect {
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.option-btn:disabled {
    cursor: default;
}

.feedback {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.feedback-heading {
    margin-bottom: 10px;
}

.next-btn {
    margin-top: 15px;
}

.score-container {
    text-align: center;
    margin: 30px 0;
}

.score {
    font-size: 3em;
    font-weight: 700;
    color: var(--primary-color);
}

/* AR sharing styles */
.objects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.object-card {
    border: 2px solid #eee;
    border-radius: var(--border-radius);
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.object-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.object-preview {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.object-preview img {
    max-width: 100%;
    max-height: 100%;
}

.message-field {
    margin-top: 10px;
}

.message-field input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 5px;
}

.object-message {
    font-style: italic;
    color: #666;
    margin: 10px 0;
}

.ar-controls {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 15px;
    z-index: 100;
}

.captured-image {
    max-width: 500px;
    margin: 0 auto 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.captured-image img {
    width: 100%;
    display: block;
}

.social-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.share-btn {
    padding: 8px 15px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    color: white;
    font-weight: 500;
}

.share-btn.instagram {
    background: linear-gradient(45deg, #405de6, #5851db, #833ab4, #c13584, #e1306c, #fd1d1d);
}

.share-btn.facebook {
    background-color: #1877f2;
}

.share-btn.twitter {
    background-color: #1da1f2;
}

.share-btn.tiktok {
    background-color: #000;
}

.hashtag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.hashtag {
    background-color: #eee;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9em;
}

/* Scenarios styles */
.scenarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.scenario-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.scenario-card h4 {
    margin-bottom: 10px;
}

.scenario-card p {
    flex-grow: 1;
    margin-bottom: 15px;
}

.scenario-container {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
}

.character-placeholder {
    text-align: center;
    margin: 30px 0;
}

.character-placeholder img {
    max-width: 200px;
    max-height: 200px;
}

.situation {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.options h4 {
    margin-bottom: 15px;
}

.decision-option {
    display: block;
    width: 100%;
    padding: 15px;
    margin-bottom: 10px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: left;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.decision-option:hover {
    background-color: #f0f0f0;
}

.consequence {
    background-color: #f0f7ff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Fix for Leaflet controls */
.leaflet-control-attribution {
    font-size: 9px;
}

.leaflet-popup-content {
    font-size: 14px;
    line-height: 1.4;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 20;
}

.menu-toggle span {
    height: 3px;
    width: 100%;
    background-color: var(--dark-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        padding: 20px 0;
        z-index: 200; /* Higher z-index to ensure it's above other content */
        max-height: 80vh; /* Limit height and enable scrolling for many menu items */
        overflow-y: auto;
        border-top: 1px solid #eee;
    }
    
    nav ul.active {
        display: flex;
    }
    
    .tools-grid,
    .objects-grid,
    .scenarios-grid {
        grid-template-columns: 1fr;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .search-container input,
    .search-container button {
        width: 100%;
        border-radius: 4px;
        margin: 0 0 10px 0;
    }
    
    .ar-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .ar-controls button {
        width: 80%;
    }
    
    /* Improve mobile form controls */
    .search-container input,
    .search-container button,
    input[type="text"],
    input[type="email"],
    textarea {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
}

/* Fix for AR instructions */
.ar-instructions {
    position: absolute;
    bottom: 80px; /* Increased to make room for end button */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    text-align: center;
    max-width: 300px;
    z-index: 10;
    pointer-events: none; /* Prevents instructions from blocking AR interaction */
}

/* Error display in AR */
.error {
    background-color: rgba(220, 53, 69, 0.8);
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    max-width: 90%;
    margin: 0 auto;
}

/* Fix accessibility focus states */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 3px solid rgba(74, 107, 223, 0.5);
    outline-offset: 2px;
}

/* Enhanced mobile menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 30;
}

.menu-toggle span {
    height: 3px;
    width: 100%;
    background-color: var(--dark-color);
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.68, -0.6, 0.32, 1.6);
    transform-origin: center;
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 20;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    nav ul {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 80%;
        max-width: 320px;
        background-color: white;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        padding: 80px 20px 20px;
        z-index: 25;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        overflow-y: auto;
    }
    
    nav ul.active {
        display: flex;
        transform: translateX(0);
    }
    
    nav ul li {
        margin: 0 0 15px 0;
    }
    
    nav ul li a {
        font-size: 1.2rem;
        display: block;
        padding: 10px 0;
        border-bottom: 1px solid #eee;
    }
    
    .footer-bottom {
        flex-direction: column;
        align-items: center;
    }
}

/* Stigma reduction specific styles */
.stigma-reduction-box {
    background-color: #e8f4ff;
    border-left: 4px solid #2e86de;
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}

.stigma-reduction-box h4 {
    color: #2e86de;
    margin-bottom: 0.5rem;
}

.reflection-prompts {
    background-color: #f5f0ff;
    border-left: 4px solid #8c7ae6;
    padding: 1rem;
    margin-top: 1.5rem;
    border-radius: 4px;
}

.reflection-prompts h4 {
    color: #8c7ae6;
    margin-bottom: 0.5rem;
}

.reflection-prompts ul {
    padding-left: 1.5rem;
}

.reflection-prompts li {
    margin-bottom: 0.5rem;
}

/* AR stigma visualization effects */
.ar-stigma-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.5;
    z-index: 10;
    animation: fade-pulse 3s infinite alternate;
}

@keyframes fade-pulse {
    0% { opacity: 0.3; }
    100% { opacity: 0.7; }
}

/* AR educational panels */
.ar-educational-panel {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 8px;
    max-width: 300px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 20;
}

.ar-educational-panel h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--primary-color);
}

/* AR public awareness elements */
.public-awareness-badge {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: var(--primary-color);
    color: white;
    padding: 10px 15px;
    border-radius: 50px;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
}

.public-awareness-badge img {
    width: 24px;
    height: 24px;
}

/* Page header - increase top spacing */
.page-header {
    padding: 4rem 0 2rem;
    margin-top: 2rem;
    background-color: var(--light-color);
}

.page-header h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
}

/* AR marker styles */
.marker-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 15px 0;
    background-color: white;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.hiro-marker-img {
    width: 150px;
    height: 150px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
}

.marker-download {
    display: inline-block;
    margin-top: 5px;
    padding: 5px 10px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    pointer-events: auto !important; /* Force pointer events */
    position: relative;
    z-index: 202; /* Highest z-index to ensure clickability */
}

.marker-download:hover {
    background-color: #3a5bcf;
}

.marker-tip {
    font-style: italic;
    font-size: 0.9rem;
    margin-top: 8px;
    color: #fff;
}

/* AR closing and ending buttons */
.ar-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 20px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.ar-close-btn:hover {
    background: rgba(220, 53, 69, 0.8);
    transform: scale(1.1);
}

.ar-end-btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.ar-end-btn:hover {
    background-color: #3a5bcf;
}

.ar-viewer {
    position: relative; /* Needed for absolute positioning of instructions/back button */
    width: 100%;
    height: 80vh; /* Or some appropriate height */
    background-color: #000; /* Fallback background */
}

/* Style for the dynamically created A-Frame scene */
.ar-viewer a-scene {
     display: block; /* Important for A-Frame within a div */
     width: 100%;
     height: 100%;
}


.hidden {
    display: none !important; /* Use !important to ensure override */
}

.info-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8); /* Semi-transparent dark background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100; /* Above AR content */
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto; /* Allow scrolling if content is tall */
}

.info-content {
    background: #fff; /* Or a glass-effect background */
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
    width: 95%;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.info-content h3 {
    margin-top: 0;
    color: #333;
}

.info-content p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.info-overlay .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #555;
}

.fact-box {
    background: #eef; /* Light blue/purple background */
    padding: 15px;
    border-left: 4px solid #673ab7; /* Purple accent */
    margin: 20px 0;
    border-radius: 5px;
}

 .fact-box h4 {
     margin-top: 0;
     color: #673ab7; /* Purple color */
 }
 .fact-box p {
     margin-bottom: 0;
 }


 .reflection-field {
     margin: 20px 0;
     padding-top: 15px;
     border-top: 1px solid #eee;
 }

 .reflection-field textarea {
     width: 100%;
     padding: 10px;
     border: 1px solid #ccc;
     border-radius: 5px;
     box-sizing: border-box; /* Include padding and border in element's total width and height */
     margin-bottom: 10px;
     font-family: inherit; /* Use page's font */
 }

 .action-buttons {
     margin-top: 20px;
     text-align: right;
 }

 .action-buttons .btn {
     margin-left: 10px;
 }

 .back-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 50; /* Below overlay, above AR content */
    /* Add more styling for look and feel */
 }

 .ar-instructions {
     position: absolute;
     top: 10px;
     left: 50%;
     transform: translateX(-50%);
     background: rgba(0, 0, 0, 0.6);
     color: white;
     padding: 8px 15px;
     border-radius: 5px;
     z-index: 50;
     font-size: 0.9em;
 }


/* Basic glass effect for feedback - adapt from your animations.css */
.glass-effect {
    background-color: rgba(255, 255, 255, 0.15);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.feedback-section .feedback-btn {
    background: rgba(255, 255, 255, 0.3); /* Slightly transparent white */
    border: 1px solid rgba(255, 255, 255, 0.4);
    -webkit-backdrop-filter: blur(5px); /* Glass effect on buttons */
    backdrop-filter: blur(5px); /* Standard property for cross-browser compatibility */
    color: #333; /* Or a darker color */
    margin: 5px;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

 .feedback-section .feedback-btn .feedback-icon {
     margin-right: 8px;
     font-size: 1.2em; /* Adjust size as needed */
 }


 .feedback-section .feedback-btn:hover,
 .feedback-section .feedback-btn.active {
     background: rgba(255, 255, 255, 0.5);
     border-color: rgba(255, 255, 255, 0.6);
     box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
 }

#detailed-feedback {
    margin-top: 20px;
     background: rgba(255, 255, 255, 0.2); /* Lighter glass */
     padding: 15px;
     border-radius: 8px;
     border: 1px solid rgba(255, 255, 255, 0.3);
     transition: opacity 0.5s ease; /* Smooth transition */
}

#detailed-feedback.hidden {
    opacity: 0;
    height: 0;
    overflow: hidden;
    padding: 0 15px; /* Collapse padding */
    margin-top: 0;
}

 .thank-you {
     text-align: center;
     font-size: 1.2em;
     color: #fff; /* White text on glass */
     margin: 10px 0;
     font-weight: bold;
 }


/* Ensure hidden elements don't take up space */
.hidden {
    display: none !important;
}

/* Add other existing styles */

/* Simulations */
.simulations-grid {
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.simulation-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.simulation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.simulation-header {
    padding: 1.5rem 1.5rem 0.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.simulation-header h3 {
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    font-size: 1.4rem;
    line-height: 1.3;
}

.simulation-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.duration-badge, .type-badge {
    background-color: rgba(74, 107, 223, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
}

.simulation-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.simulation-description {
    margin-bottom: 1rem;
    flex-grow: 0;
}

.warning-box {
    background-color: #fff8e1;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--warning-color);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.warning-icon {
    flex-shrink: 0;
    color: var(--warning-color);
    margin-top: 2px;
}

.warning-icon svg {
    fill: var(--warning-color);
}

.warning-box p {
    margin-bottom: 0;
}

.simulation-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.simulation-features {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.feature-tag {
    background-color: rgba(109, 201, 147, 0.1);
    color: var(--secondary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.feature-tag svg {
    fill: var(--secondary-color);
}

.simulation-card .btn {
    margin-bottom: 0;
}

/* Fix for overlay issue */
.fullscreen-overlay {
    z-index: 1000;
}

.overlay-content {
    z-index: 1001;
}

/* Alert box in header */
.alert-box {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin: 1.5rem auto 0;
    max-width: 800px;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.alert-icon {
    flex-shrink: 0;
    color: white;
    margin-top: 3px;
}

.alert-icon svg {
    fill: white;
}

.alert-content {
    font-size: 0.95rem;
}

.alert-content strong {
    font-weight: 600;
}

/* Add responsive adjustments */
@media (max-width: 768px) {
    .simulation-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .simulation-features {
        margin-top: 0.5rem;
    }
    
    .alert-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* Page headers - used by activities and other pages */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), #8a4bdf);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.page-header h2 {
    color: white;
    margin-bottom: 1rem;
}

.page-header p {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer styles */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 2rem 0;
}
.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer .container .logo {
    display: flex;
    align-items: center;
}
.footer .container .logo img {
    width: 50px; /* Adjust size as needed */
    margin-right: 10px;
}
.footer .container .logo h1 {
    font-size: 1.5rem;
    color: white;
    margin: 0;
}
.footer .container .logo h1 span {
    color: var(--primary-color);
}

.logo-link {
    text-decoration: none; /* Removes underline */
    color: inherit;       /* Makes it use the parent's text color */
    display: inline-block; /* Adjust as needed for layout */
}
.logo-link:hover {
    /* Optional: add hover effect */
    text-decoration: none; /* Or underline, etc. */
}