/* =============================================
   InfinitySpace42 - Features Styles
   Search, Chatbot, Mobile Menu, Investment
   ============================================= */

/* =============================================
   Global Search & AI Toggle & Chatbot
   ============================================= */

/* Global Search & AI Toggle Styles */
.global-search-container {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    position: relative;
    flex-shrink: 0;
    margin-left: auto;
}

.mobile-search-toggle-button {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(0, 255, 255, 0.4);
    background: rgba(var(--surface-dark-rgb), 0.25);
    color: var(--primary-cyan);
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
    margin-right: 10px;
}

.mobile-search-toggle-button:focus-visible {
    outline: 3px solid rgba(0, 255, 255, 0.5);
    outline-offset: 2px;
}

.mobile-search-toggle-button:hover {
    background: rgba(0, 255, 255, 0.12);
    transform: translateY(-1px);
}

.mobile-search-close {
    display: none;
    background: transparent;
    border: none;
    color: var(--primary-cyan);
    cursor: pointer;
}

.mobile-search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    justify-content: center;
    align-items: flex-start;
    padding: 48px 16px 24px;
    overflow-y: auto;
    pointer-events: none;
    z-index: 10990;
}

.mobile-search-overlay .mobile-search-portal {
    width: 100%;
    display: flex;
    justify-content: center;
}

.search-input-wrapper {
    position: relative;
    background: rgba(var(--surface-dark-rgb), 0.2);
    border: 1px solid var(--primary-cyan);
    border-radius: 25px;
    padding: 0.5rem 3.75rem 0.5rem 1rem;
    backdrop-filter: blur(10px);
    min-width: 200px;
    max-width: 250px;
}

.search-input-wrapper input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 0.9rem;
    font-family: 'Montserrat', sans-serif;
}

.search-input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-input-wrapper .search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-cyan);
    font-size: 1rem;
    cursor: pointer;
}

.search-control-buttons {
    position: absolute;
    right: 2.2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.search-nav-button {
    width: 1.75rem;
    height: 1.5rem;
    border: 1px solid rgba(0, 255, 255, 0.35);
    background: rgba(var(--surface-dark-rgb), 0.35);
    color: var(--primary-cyan);
    border-radius: 6px;
    font-size: 0.65rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.search-nav-button:hover:not([disabled]),
.search-nav-button:focus-visible:not([disabled]) {
    background: rgba(0, 255, 255, 0.25);
    color: #000;
    border-color: rgba(0, 255, 255, 0.6);
    outline: none;
}

.search-nav-button[aria-disabled="true"],
.search-nav-button.is-disabled {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

.ai-toggle-wrapper {
    display: flex;
    align-items: center;
}

.ai-checkbox {
    display: none;
}

.ai-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(var(--surface-dark-rgb), 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    backdrop-filter: blur(10px);
    font-size: 0.9rem;
    font-weight: 500;
}

.ai-label:hover {
    border-color: var(--primary-cyan);
    color: white;
}

.ai-checkbox:checked + .ai-label {
    background: rgba(0, 255, 255, 0.2);
    border-color: var(--primary-cyan);
    color: var(--primary-cyan);
}

.ai-checkbox:checked + .ai-label i {
    color: var(--primary-cyan);
}

.global-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(var(--surface-dark-rgb), 0.95);
    border: 2px solid var(--primary-cyan);
    border-radius: 15px;
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    backdrop-filter: blur(15px);
    display: none;
    min-width: 400px;
}

.global-search-result-item {
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    color: inherit;
    font: inherit;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.global-search-result-item:hover {
    background: rgba(0, 255, 255, 0.1);
    transform: translateX(5px);
}

.global-search-result-item:focus-visible {
    outline: 2px solid rgba(0, 255, 204, 0.7);
    outline-offset: -2px;
}

.global-search-result-item.active {
    background: rgba(0, 255, 255, 0.18);
    transform: translateX(5px);
    box-shadow: inset 0 0 0 1px rgba(0, 255, 255, 0.25);
}

.global-search-result-item:last-child {
    border-bottom: none;
}

.global-search-result-icon {
    font-size: 1.5rem;
    min-width: 30px;
    text-align: center;
}

.global-search-result-media {
    width: 80px;
    height: 60px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(var(--surface-dark-rgb), 0.35);
}

.global-search-result-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.global-search-result-info {
    flex: 1;
}

.global-search-result-title {
    color: white;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.global-search-result-content {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
    line-height: 1.3;
}

.global-search-results-header {
    padding: 0.75rem 1.5rem 0.5rem;
    border-bottom: 1px solid rgba(0, 255, 255, 0.25);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.global-search-results-label {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(0, 255, 255, 0.85);
}

.global-search-results-hint {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.global-search-message {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.2rem 1.5rem;
}

.global-search-message-icon {
    font-size: 1.6rem;
}

.global-search-message-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.global-search-message-title {
    color: #fff;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.global-search-message-description,
.global-search-result-query {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.global-search-result-query {
    margin-top: 0.4rem;
    font-style: italic;
}

.global-search-highlight {
    background: rgba(0, 255, 204, 0.35);
    color: #012a2a;
    padding: 0 0.2em;
    border-radius: 4px;
}

.search-highlight-target {
    position: relative;
    background: rgba(0, 255, 204, 0.2);
    box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.25);
    border-radius: 10px;
    animation: searchHighlightPulse 1.5s ease-in-out 2;
    transition: background 0.6s ease;
}

.search-highlight-target--fadeout {
    background: rgba(0, 255, 204, 0.08) !important;
    box-shadow: none !important;
}

@keyframes searchHighlightPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 255, 255, 0.35);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(0, 255, 255, 0.15);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 255, 0.35);
    }
}

/* Makerspace Request Form */
.makerspace-form-section {
    padding: 4rem 0;
}

.makerspace-form-lead {
    text-align: center;
    margin: 1rem auto 3rem auto;
    color: var(--text-secondary);
    max-width: 720px;
    line-height: 1.6;
}

.required-marker {
    color: var(--primary-cyan);
}

.makerspace-form-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.makerspace-form {
    background: rgba(var(--surface-dark-rgb), 0.85);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    box-shadow: 0 20px 40px rgba(var(--surface-dark-rgb), 0.45);
}

.makerspace-fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.makerspace-fieldset legend {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1.2rem;
}

.makerspace-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.field-group label,
.field-label {
    font-weight: 600;
    color: white;
    font-size: 0.95rem;
}

.field-note {
    display: inline-block;
    margin-left: 0.5rem;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.makerspace-field-hint {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: -0.4rem 0 1.2rem;
}

.makerspace-form input[type="text"],
.makerspace-form input[type="email"],
.makerspace-form input[type="tel"],
.makerspace-form input[type="date"],
.makerspace-form select,
.makerspace-form textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 255, 0.5);
    background: rgba(var(--surface-dark-rgb), 0.65);
    color: white;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.makerspace-form textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
    line-height: 1.5;
}

.makerspace-form input:focus,
.makerspace-form select:focus,
.makerspace-form textarea:focus {
    border-color: var(--primary-cyan);
    box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.15);
    outline: none;
    background: rgba(var(--surface-dark-rgb), 0.8);
}

.char-counter {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.char-counter.is-warning {
    color: #ff8a80;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.8rem;
}

.option-chip {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(0, 255, 255, 0.4);
    border-radius: 10px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    background: rgba(var(--surface-dark-rgb), 0.4);
}

.option-chip input {
    position: absolute;
    opacity: 0;
    inset: 0;
    cursor: pointer;
}

.option-chip:hover {
    border-color: var(--primary-cyan);
    box-shadow: 0 8px 20px rgba(0, 255, 255, 0.15);
}

.option-chip.is-selected {
    background: rgba(0, 255, 255, 0.15);
    border-color: var(--primary-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.25);
    color: var(--primary-cyan);
}

.color-swatches {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.color-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(var(--surface-dark-rgb), 0.35);
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.color-swatch[data-status="backorder"] {
    border-style: dashed;
}

.color-swatch input {
    position: absolute;
    opacity: 0;
    inset: 0;
    cursor: pointer;
}

.color-swatch .swatch {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: var(--swatch-color, #111);
}

.color-swatch .swatch-label {
    font-size: 0.85rem;
    text-align: center;
    color: var(--text-secondary);
}

.color-swatch .swatch-note {
    font-size: 0.7rem;
    text-align: center;
    color: var(--text-secondary);
    line-height: 1.3;
}

.color-swatch.is-selected {
    border-color: var(--primary-cyan);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.25);
}

.file-dropzone {
    border: 2px dashed rgba(0, 255, 255, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    background: rgba(var(--surface-dark-rgb), 0.45);
    transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

.file-dropzone:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.15);
}

.file-dropzone.is-dragover {
    border-color: var(--primary-cyan);
    background: rgba(0, 255, 255, 0.1);
}

.dropzone-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.dropzone-button {
    background: transparent;
    border: none;
    color: var(--primary-cyan);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

.dropzone-button:hover {
    color: white;
}

.upload-hint,
.upload-note {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.file-placeholder {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
}

.file-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    background: rgba(var(--surface-dark-rgb), 0.4);
    border: 1px solid rgba(0, 255, 255, 0.15);
}

.file-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.file-name {
    font-weight: 600;
    color: white;
    word-break: break-word;
}

.file-size {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.file-progress {
    grid-column: 1 / -1;
    height: 6px;
    background: rgba(0, 255, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-cyan), #00b7ff);
    transition: width 0.3s ease;
}

.file-status-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: block;
    margin-top: 0.15rem;
}

.file-item[data-upload-status="uploading"] .file-status-text {
    color: var(--primary-cyan);
}

.file-item[data-upload-status="uploaded"] .file-status-text {
    color: #52ffa8;
}

.file-item[data-upload-status="failed"] .file-status-text {
    color: #ff6b6b;
}

.file-item[data-upload-status="cancelled"] .file-status-text {
    color: var(--text-secondary);
}

.file-item[data-upload-status="uploaded"] .progress-bar {
    background: linear-gradient(90deg, #52ffa8, #1dd1a1);
}

.file-item[data-upload-status="failed"] .progress-bar {
    background: linear-gradient(90deg, #ff6b6b, #ff3b3b);
}

.file-item[data-upload-status="cancelled"] .progress-bar {
    background: rgba(0, 255, 255, 0.25);
}

.remove-file {
    justify-self: end;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.35rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.remove-file:hover {
    border-color: #ff6b6b;
    color: #ff6b6b;
}

.field-error {
    min-height: 1.1rem;
    font-size: 0.8rem;
    color: #ff8a80;
}

.makerspace-form input.has-error,
.makerspace-form select.has-error,
.makerspace-form textarea.has-error {
    border-color: #ff6b6b !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.15) !important;
}

.file-dropzone.has-error {
    border-color: #ff6b6b !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.15) !important;
}

.option-grid.has-error {
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.2);
    border-radius: 12px;
    padding: 0.5rem;
}

.option-grid.has-error .option-chip {
    border-color: rgba(255, 107, 107, 0.8);
}

.consent-checkbox.has-error {
    color: #ff8a80;
}

.makerspace-form-footer {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.consent-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.consent-checkbox input {
    margin-top: 0.25rem;
    width: 18px;
    height: 18px;
}

.consent-checkbox a {
    color: var(--primary-cyan);
}

.makerspace-submit {
    width: 100%;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-cyan), #00b7ff);
    color: #000;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.makerspace-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 18px 35px rgba(0, 255, 255, 0.25);
}

.makerspace-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.contact-cta {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-cta__lead {
    margin: 0;
    font-size: 0.95rem;
}

.contact-cta__buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.contact-cta__button {
    min-width: 190px;
}

.contact-cta__feedback {
    min-height: 1.25rem;
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
}

.participation-cta {
    padding: 4rem 0;
    background: transparent;
    position: relative;
    overflow: hidden;
}

.participation-cta::before {
    content: none;
}

.participation-cta__content {
    position: relative;
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}

.participation-cta__lead {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 1rem;
}

.participation-cta__buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.participation-cta__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.95rem 2.4rem;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
    color: #000;
    background: linear-gradient(135deg, var(--primary-cyan), #00b7ff);
    box-shadow: 0 16px 40px rgba(0, 255, 255, 0.15);
}

.participation-cta__button--whatsapp {
    background: linear-gradient(135deg, #25d366, #1ebe5d);
    color: #021b0f;
}

.participation-cta__button--form {
    background: linear-gradient(135deg, var(--primary-purple), #00b7ff);
    color: #fff;
}

.participation-cta__button:hover,
.participation-cta__button:focus {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(var(--surface-dark-rgb), 0.35);
    filter: brightness(1.05);
}

@media (max-width: 640px) {
    .participation-cta {
        padding: 3rem 0;
    }

    .participation-cta__button {
        width: 100%;
    }
}

#color-special {
    margin-top: 0.75rem;
}

.secondary-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.75rem 1.6rem;
    border-radius: 999px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    border: none;
    cursor: pointer;
}

.secondary-cta.whatsapp {
    background: #25d366;
}

.secondary-cta.instagram {
    background: linear-gradient(135deg, #feda75, #d62976, #4f5bd5);
}

.secondary-cta.email {
    background: #ea4335;
}

.secondary-cta.reclaim {
    background: linear-gradient(135deg, #7f5af0, #6436d9);
}

.secondary-cta:hover,
.secondary-cta:focus {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(var(--surface-dark-rgb), 0.35);
}

.secondary-cta.is-success {
    background: #2ecc71;
    color: #082b18;
}

.secondary-cta.is-error {
    background: #ff6b6b;
}

.form-message {
    border-radius: 12px;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    display: none;
}

.form-message.is-success {
    display: block;
    border: 1px solid rgba(0, 255, 204, 0.4);
    background: rgba(0, 255, 204, 0.12);
    color: var(--primary-cyan);
}

.form-message.is-error {
    display: block;
    border: 1px solid rgba(255, 107, 107, 0.4);
    background: rgba(255, 107, 107, 0.12);
    color: #ff8a80;
}

.recap {
    display: inline-block;
    margin-top: 0.5rem;
    color: rgba(255, 255, 255, 0.85);
}

.floating-scroll-button {
    position: fixed;
    bottom: max(1.5rem, calc(env(safe-area-inset-bottom, 0px) + 1.25rem));
    right: auto;
    left: max(1.5rem, calc(env(safe-area-inset-left, 0px) + 1.25rem));
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary-cyan), #0080ff);
    color: #000;
    font-size: 1.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 30px rgba(0, 255, 255, 0.35);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.3s ease;
    z-index: 1200;
    padding: 0;
    gap: 0;
}

.floating-scroll-button .floating-button-icon {
    font-size: 1.4rem;
    line-height: 1;
}

.floating-scroll-button .floating-button-label {
    display: none;
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
}

.floating-scroll-button:hover,
.floating-scroll-button:focus {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 18px 36px rgba(0, 255, 255, 0.45);
}

.floating-scroll-button.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
}

.makerspace-conditional {
    display: none;
}

.makerspace-conditional.is-visible {
    display: block;
}

@media (min-width: 768px) {
    .makerspace-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .makerspace-form {
        padding: 2.5rem 3rem;
    }
}

@media (max-width: 640px) {
    .floating-scroll-button {
        bottom: max(1rem, calc(env(safe-area-inset-bottom, 0px) + 0.75rem));
        right: auto;
        left: max(1rem, calc(env(safe-area-inset-left, 0px) + 0.75rem));
        width: 3rem;
        height: 3rem;
        font-size: 1.2rem;
    }

    .contact-cta__buttons {
        gap: 0.6rem;
    }

    .contact-cta__button {
        min-width: 160px;
    }
}

@media (min-width: 1024px) {
    .floating-scroll-button {
        width: auto;
        height: auto;
        padding: 0.75rem 1.5rem;
        border-radius: 999px;
        font-size: 1rem;
        gap: 0.65rem;
    }

    .floating-scroll-button .floating-button-icon {
        font-size: 1.2rem;
    }

    .floating-scroll-button .floating-button-label {
        display: inline-flex;
        align-items: center;
    }
}

/* Essential Global Search */
.global-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(var(--surface-dark-rgb), 0.95);
    border: 1px solid var(--primary-cyan);
    border-radius: 12px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: 5px;
}

/* Essential chatbot trigger only */
.chatbot-trigger {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--primary-cyan);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

@media (max-width: 768px) {
    body.mobile-search-open {
        overflow: hidden;
    }

    .mobile-search-toggle-button {
        display: inline-flex;
    }

    .mobile-search-overlay {
        background: rgba(var(--surface-dark-rgb), 0.55);
        padding: clamp(40px, 8vh, 72px) 16px 24px;
    }

    .mobile-search-overlay.is-visible {
        display: flex;
        pointer-events: auto;
    }

    .global-search-container {
        display: none;
    }

    .global-search-container.is-mobile-active {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        position: fixed;
        top: min(18vh, 120px);
        left: 50%;
        transform: translateX(-50%);
        width: min(100vw - 32px, 420px);
        background: rgba(10, 10, 10, 0.96);
        border: 1px solid rgba(0, 255, 255, 0.45);
        border-radius: 20px;
        padding: 1.5rem 1.25rem;
        box-shadow: 0 25px 60px rgba(var(--surface-dark-rgb), 0.45);
        z-index: 11000;
        margin-left: 0;
    }

    .global-search-container.is-mobile-active.is-mobile-detached {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        margin: clamp(32px, 6vh, 80px) auto 0;
        width: min(100%, 420px);
        z-index: auto;
        align-self: center;
    }

    .global-search-container.is-mobile-active .search-input-wrapper {
        min-width: 100%;
        max-width: 100%;
        background: rgba(var(--surface-dark-rgb), 0.55);
        padding-right: 3.5rem;
    }

    .global-search-container.is-mobile-active .search-control-buttons {
        right: 3.1rem;
    }

    .global-search-container.is-mobile-active .search-nav-button {
        height: 1.75rem;
        width: 1.9rem;
    }

    .global-search-container.is-mobile-active .global-search-results {
        display: block;
        position: static;
        width: 100%;
        margin-top: 0;
        max-height: 45vh;
    }

    .global-search-container.is-mobile-active .mobile-search-close {
        display: inline-flex;
        align-self: flex-end;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        border-radius: 50%;
        border: none;
        background: rgba(0, 255, 255, 0.18);
        color: var(--primary-cyan);
        font-size: 1.1rem;
        transition: transform 0.2s ease, background 0.2s ease;
    }

    .global-search-container.is-mobile-active .mobile-search-close:focus-visible {
        outline: 3px solid rgba(0, 255, 255, 0.5);
        outline-offset: 2px;
    }

    .global-search-container.is-mobile-active .mobile-search-close:hover {
        transform: translateY(-1px);
        background: rgba(0, 255, 255, 0.26);
    }


/* =============================================
   Mobile Menu Toggle
   ============================================= */

/* Mobile Menu Toggle Styles */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 5px;
    z-index: 10001;
    background: transparent;
    border: none;
    color: inherit;
}

.mobile-menu-toggle:focus-visible {
    outline: 3px solid rgba(0, 255, 255, 0.6);
    outline-offset: 3px;
    border-radius: 6px;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: var(--primary-cyan);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(var(--surface-dark-rgb), 0.95);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch !important;
        padding: 32px 24px 24px;
        transition: left 0.3s ease;
        z-index: 10000;
        gap: 12px;
        overflow-y: auto;
        overflow-x: visible;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu > li {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .nav-link {
        font-size: 1.2rem;
        color: white;
        text-decoration: none;
        padding: 15px 20px;
        border-radius: 8px;
        transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, border-color 0.3s ease;
        text-align: left;
        width: 100%;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        flex-direction: row;
    }

    .nav-link:hover {
        background: rgba(0, 255, 255, 0.1);
        color: var(--primary-cyan);
    }
    
    /* Mobile dropdown menus - stacked accordion behaviour */
    .nav-item-dropdown {
        width: 100%;
    }

    .nav-item-dropdown .nav-parent {
        width: 100%;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
        position: relative;
    }

    .nav-item-dropdown .nav-parent .nav-link {
        flex: 1 1 auto;
        margin: 0;
        padding-right: 3.5rem;
    }

    .nav-item-dropdown .dropdown-toggle {
        width: 2.75rem;
        height: 2.75rem;
        min-width: 2.75rem;
        min-height: 2.75rem;
        border-radius: 999px;
        border: 1px solid rgba(0, 255, 255, 0.35);
        background: rgba(0, 255, 255, 0.12);
        color: var(--primary-cyan);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
        margin-left: 0;
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        pointer-events: auto;
        z-index: 1001;
        padding: 0;
    }

    .nav-item-dropdown .dropdown-toggle:hover,
    .nav-item-dropdown .dropdown-toggle:focus-visible {
        background: rgba(0, 255, 255, 0.18);
        color: #ffffff;
    }

    .nav-item-dropdown.mobile-open .nav-link,
    .nav-item-dropdown.dropdown-open .nav-link {
        background: rgba(0, 255, 255, 0.08);
        color: var(--primary-cyan);
    }

    .nav-item-dropdown.mobile-open .dropdown-toggle,
    .nav-item-dropdown.dropdown-open .dropdown-toggle {
        background: rgba(0, 255, 255, 0.18);
        color: #ffffff;
    }

    .nav-item-dropdown .dropdown-toggle-icon {
        font-size: 1.15rem;
        transition: transform 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        transform: translateY(2px);
    }

    .nav-item-dropdown.mobile-open .dropdown-toggle-icon,
    .nav-item-dropdown.dropdown-open .dropdown-toggle-icon {
        transform: rotate(-180deg) translateY(2px);
    }

    .nav-item-dropdown .dropdown-menu {
        position: static !important;
        margin: 8px 0 0 !important;
        padding: 8px 0 !important;
        min-width: 100% !important;
        max-width: 100% !important;
        background: rgba(12, 12, 12, 0.92) !important;
        border: 1px solid rgba(0, 255, 255, 0.25) !important;
        border-radius: 12px !important;
        box-shadow: 0 15px 30px rgba(var(--surface-dark-rgb), 0.5) !important;
        display: none !important;
        flex-direction: column !important;
        gap: 0 !important;
        overflow: hidden !important;
        pointer-events: auto !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .nav-item-dropdown.mobile-open .dropdown-menu,
    .nav-item-dropdown.dropdown-open .dropdown-menu {
        display: flex !important;
    }

    .nav-item-dropdown .dropdown-link {
        display: flex !important;
        align-items: center !important;
        gap: 0.65rem !important;
        padding: 12px 20px 12px 52px !important;
        color: white !important;
        text-decoration: none !important;
        border-bottom: 1px solid rgba(0, 255, 255, 0.2) !important;
        transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
        text-align: left !important;
        box-sizing: border-box !important;
    }

    .nav-item-dropdown .dropdown-link .dropdown-icon {
        font-size: 1.1rem !important;
    }

    .nav-item-dropdown .dropdown-link:last-child {
        border-bottom: none !important;
    }

    .nav-item-dropdown .dropdown-link:hover {
        background: rgba(0, 255, 255, 0.1) !important;
        color: var(--primary-cyan) !important;
    }
}

.social-links img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.legal-content h2 {
    color: var(--primary-purple);
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin: 2rem 0 1rem 0;
}

.legal-content h3 {
    color: var(--primary-cyan);
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin: 1.5rem 0 1rem 0;
}

.legal-content h4 {
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin: 1rem 0 0.5rem 0;
}

.legal-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.legal-content ul {
    color: var(--text-secondary);
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-content ul li {
    margin-bottom: 0.5rem;
}

.footer-community {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.footer-community h4 {
    color: var(--primary-purple);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    text-align: center;
}

.footer-legal h4 {
    color: var(--primary-purple);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 255, 255, 0.1);
    color: var(--text-secondary);
}

.footer-bottom p {
    margin: 5px 0;
}


/* =============================================
   Investment & Team Leader
   ============================================= */

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

.benefit-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid rgba(0, 255, 255, 0.2);
    transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.2);
    border-color: rgba(0, 255, 255, 0.4);
}

.benefit-card h3 {
    color: var(--primary-cyan);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.benefit-card p {
    color: var(--text-primary);
    line-height: 1.6;
}

/* Team Leader Section */
.team-leader {
    padding: 4rem 0;
    background: rgba(var(--page-accent-secondary-rgb), 0.12);
}

.leader-card, .current-events-card {
    display: flex;
    align-items: center;
    gap: 3rem;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 3rem;
    border: 1px solid rgba(0, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(var(--surface-dark-rgb), 0.3);
    position: relative;
    overflow: hidden;
}

.current-events-card {
    display: block;
    align-items: unset;
}

.leader-card::before, .current-events-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.leader-card:hover::before, .current-events-card:hover::before {
    left: 100%;
}

.leader-image {
    flex-shrink: 0;
    perspective: 1200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.leader-image-inner {
    position: relative;
    width: 200px;
    height: 200px;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.leader-card:hover .leader-image-inner,
.leader-card:focus-visible .leader-image-inner,
.leader-card:focus-within .leader-image-inner {
    transform: rotateY(180deg);
}

.leader-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-cyan);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    backface-visibility: hidden;
}

.leader-image-front {
    object-position: center 85%;
    transform: rotate(-45deg);
}

.leader-image-back {
    transform: rotateY(180deg);
}

.leader-content {
    flex: 1;
    padding-left: 2rem;
}

body[data-page-theme="team"] .team-leader,
body[data-page-theme="team"] .team-members,
body[data-page-theme="team"] .team-vision,
body[data-page-theme="team-career"] .team-leader,
body[data-page-theme="team-career"] .team-members,
body[data-page-theme="team-career"] .team-vision {
    background: rgba(var(--page-accent-secondary-rgb), 0.12);
}

