/* =============================================
   InfinitySpace42 - Responsive Design
   Mobile Fixes, Media Queries, Breakpoints
   ============================================= */

/* =============================================
   Mobile Fixes (Dropdowns, Hero, Shop)
   ============================================= */

    /* Mobile Hero Section Fix */
    .hero {
        min-height: auto;
        padding: 3rem 0 4.5rem;
        align-items: flex-start;
        overflow: visible;
    }

    .hero-content {
        padding: 1.5rem 1.25rem 2.5rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
        margin: 1rem 0;
    }
    
    /* Mobile Dropdown Fix */
    #profile-dropdown,
    #feedback-dropdown {
        position: fixed !important;
        top: calc(70px + 10px) !important;
        left: 50% !important;
        right: auto !important;
        width: min(100vw - 32px, 420px) !important;
        max-width: min(100vw - 32px, 420px) !important;
        z-index: 10000 !important;
        transform: translateX(-50%) !important;
    }

    #profile-dropdown .dropdown-slideout-panel,
    #feedback-dropdown .dropdown-slideout-panel {
        max-height: min(80vh, 540px) !important;
        overflow-y: auto !important;
        padding: 18px 18px 22px !important;
    }

    #profile-dropdown [data-dropdown-close],
    #feedback-dropdown [data-dropdown-close] {
        width: 36px !important;
        height: 36px !important;
        border-radius: 50% !important;
    }

    /* Mobile Navigation Links Fix */
    .nav-menu {
        background: rgba(var(--banner-color-rgb, 13, 27, 42), 0.92);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(var(--page-accent-rgb, 0, 255, 255), 0.35);
        border-radius: 10px;
        margin: 0 10px;
    }

    .nav-link {
        padding: 15px 20px;
        font-size: 16px;
        border-bottom: 1px solid rgba(var(--page-accent-rgb, 0, 255, 255), 0.15);
        display: block;
        width: 100%;
        text-align: left;
        color: var(--banner-text-color, #ffffff);
        text-decoration: none;
        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;
    }

    .nav-link:hover,
    .nav-link:focus,
    .nav-link:active {
        background: rgba(var(--page-accent-rgb, 0, 255, 255), 0.14);
        color: var(--page-accent, var(--primary-cyan));
        transform: translateX(5px);
    }
    
    /* Ensure clickable area */
    .nav-link {
        position: relative;
        z-index: 1000;
        pointer-events: auto;
    }
    
    /* Fix logo sizing issues on mobile */
    .logo img {
        max-height: 50px;
        width: auto;
        transition: none;
    }
    
    /* Prevent layout shifts */
    .hero-content {
        opacity: 1;
        transform: none;
        animation: none;
    }
    
    /* Mobile-specific container fixes */
    .container {
        padding: 0 15px;
        width: 100%;
        max-width: 100%;
    }
    
    .chatbot-container {
        width: calc(100vw - 2rem);
        height: calc(100vh - 4rem);
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }

    .feedback-btn,
    .user-profile-btn {
        min-height: 44px;
        padding: 0 18px;
        font-size: 0.95rem;
    }

    .modern-navbar .feedback-btn {
        min-height: 38px;
        padding: 0 14px;
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    #feedback-popup {
        top: 50% !important;
        left: 50% !important;
        right: auto !important;
        bottom: auto !important;
        transform: translate(-50%, -50%) !important;
        width: min(100vw - 32px, 400px) !important;
        max-width: min(100vw - 32px, 400px) !important;
        border-radius: 18px !important;
    }
}

.mobile-fullscreen {
    position: fixed !important;
    top: 16px !important;
    right: 16px !important;
    bottom: 16px !important;
    left: 16px !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 18px !important;
    margin: 0 !important;
    box-shadow: 0 20px 50px rgba(var(--surface-dark-rgb), 0.35) !important;
    border: 1px solid rgba(0, 255, 255, 0.15) !important;
    display: flex !important;
    overflow: hidden !important;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%) !important;
}

.chat-tab-info-message {
    margin: 0.5rem 0.75rem 0.75rem;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 204, 0.3);
    background: linear-gradient(135deg, rgba(0, 255, 204, 0.12) 0%, rgba(0, 153, 255, 0.08) 100%);
    color: #e6fbff;
    font-size: 0.85rem;
    line-height: 1.4;
    text-align: left;
    box-shadow: 0 10px 24px rgba(var(--surface-dark-rgb), 0.28);
}

.chat-info-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
}

.chat-tab-info-message .chat-info-text {
    text-align: left;
}

.chat-tab-info-message .chat-info-text p {
    margin: 0;
    color: #d2f8ff;
    font-size: 0.85rem;
}

.chat-info-community-btn,
.chat-info-feedback-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.95rem;
    border-radius: 999px;
    border: none;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.chat-info-community-btn {
    background: linear-gradient(135deg, rgba(0, 255, 204, 0.95), rgba(0, 168, 255, 0.85));
    color: #02141f;
    box-shadow: 0 10px 20px rgba(0, 200, 255, 0.32);
}

.chat-info-feedback-btn {
    background: rgba(0, 255, 204, 0.16);
    color: #9afcff;
    border: 1px solid rgba(0, 255, 204, 0.35);
}

.chat-info-actions-row .chat-info-feedback-btn {
    min-width: 0;
    justify-content: center;
}

.chat-info-community-btn:hover,
.chat-info-community-btn:focus {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0, 200, 255, 0.45);
    background: linear-gradient(135deg, rgba(0, 255, 204, 1), rgba(0, 191, 255, 0.95));
}

.chat-info-feedback-btn:hover,
.chat-info-feedback-btn:focus {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 255, 204, 0.25);
    background: rgba(0, 255, 204, 0.22);
}

.chat-info-feedback-btn:focus,
.chat-info-community-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 255, 204, 0.35);
}

@media (max-width: 768px) {
    .chat-info-actions-row {
        flex-direction: column;
        align-items: stretch;
    }

    .chat-info-community-btn,
    .chat-info-feedback-btn {
        width: 100%;
        justify-content: center;
    }

    .chat-tab-info-message,
    .chat-tab-info-message .chat-info-text {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .mobile-fullscreen .chatbot-header {
        border-radius: 16px 16px 0 0 !important;
    }

    .mobile-fullscreen .chatbot-messages {
        height: auto !important;
    }

    .mobile-fullscreen .chat-tabs-container {
        position: sticky;
        top: 0;
        z-index: 3;
    }
}

@media (max-width: 520px) {
    .mobile-fullscreen {
        top: 12px !important;
        right: 12px !important;
        bottom: 12px !important;
        left: 12px !important;
        border-radius: 16px !important;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 2.5rem 0 3rem;
    }

    .hero-content {
        padding: 1.5rem 1rem 2.5rem;
        text-align: center;
    }

    .hero-title {
        font-size: 1.75rem;
        line-height: 1.25;
    }

    .hero-title .title-main {
        display: block;
        font-size: 1.85rem;
    }

    .hero-subtitle {
        font-size: 1.05rem;
        line-height: 1.4;
        margin-bottom: 1rem;
    }

    .hero-description,
    .hero-text-content,
    .hero-offer {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .hero-text {
        gap: 1rem;
    }

    .hero-offer a {
        display: inline-block;
        margin-top: 0.35rem;
    }

    .development-notice {
        font-size: 0.9rem;
        line-height: 1.6;
        padding: 1rem;
    }
}

.google-signin-overlay {
    position: fixed;
    inset: 0;
    background: rgba(var(--surface-dark-rgb), 0.65);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 20000;
}

.google-signin-modal {
    background: #ffffff;
    border-radius: 18px;
    max-width: 420px;
    width: min(100%, 420px);
    padding: 28px 24px 24px;
    box-shadow: 0 20px 60px rgba(var(--surface-dark-rgb), 0.25);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.google-signin-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #5f6368;
    line-height: 1;
}

.google-signin-close:hover {
    color: #202124;
}

.google-signin-header h3 {
    margin: 0;
    color: #202124;
    font-size: 1.45rem;
}

.google-signin-header p {
    margin: 8px 0 0;
    color: #5f6368;
    font-size: 0.95rem;
    line-height: 1.4;
}

.google-signin-button-wrapper {
    display: flex;
    justify-content: center;
}

.google-signin-hint {
    margin: 0;
    text-align: center;
    color: #5f6368;
    font-size: 0.85rem;
    line-height: 1.4;
}

@media (max-width: 520px) {
    .google-signin-modal {
        border-radius: 16px;
        padding: 24px 18px 20px;
    }

    .google-signin-header h3 {
        font-size: 1.3rem;
    }

    .google-signin-header p {
        font-size: 0.9rem;
    }
}


/* =============================================
   Mobile Responsive Styles
   ============================================= */

/* Essential mobile responsive styles */
@media (max-width: 768px) {
    .areas-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .donation-grid {
        grid-template-columns: 1fr;
    }
    
    .qr-donation-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .donation-qr-code {
        width: 150px;
        height: 150px;
    }
    
    .payment-buttons {
        flex-direction: column;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: left;
        justify-items: start;
    }

    .footer-brand,
    .footer-community,
    .footer-legal {
        align-items: flex-start;
        text-align: left;
    }

    .footer-community h4 {
        text-align: left;
        width: 100%;
    }

    .social-row {
        justify-content: flex-start;
    }
}

/* 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);
}

/* Area Voting System Styles */
#start-voting-btn {
    margin: 1rem 0;
    display: block;
}

#start-voting-btn.voting-active {
    background: linear-gradient(135deg, #ff4444, #cc0000);
}

.feature-card.voting-mode {
    border: 2px dashed var(--primary-purple);
    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;
}

.feature-card.voting-mode:hover {
    border-color: var(--primary-cyan);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.feature-card.selected-for-voting {
    border: 2px solid var(--primary-cyan);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(0, 255, 255, 0.1));
    position: relative;
}

.priority-number {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-cyan);
    color: var(--dark-bg);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    z-index: 10;
}

#voting-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(var(--surface-dark-rgb), 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.voting-panel {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 15px;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--primary-purple);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

.voting-panel h3 {
    color: var(--primary-purple);
    margin-bottom: 1rem;
    text-align: center;
}

.voting-panel p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    text-align: center;
}

#selected-areas-list {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.no-selection {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
}

.priority-list {
    color: var(--text-light);
    margin: 0.5rem 0;
}

.priority-list li {
    margin: 0.5rem 0;
    padding: 0.5rem;
    background: rgba(0, 255, 255, 0.1);
    border-radius: 5px;
}

.voting-form .form-group {
    margin-bottom: 1rem;
}

.voting-form label {
    display: block;
    color: var(--primary-cyan);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.voting-form input,
.voting-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    background: rgba(26, 26, 46, 0.8);
    color: var(--text-light);
    font-size: 1rem;
}

.voting-form input:focus,
.voting-form textarea:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.voting-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.voting-buttons button {
    flex: 1;
}


.leader-content h3 {
    color: var(--primary-cyan);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.leader-content h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.leader-content h3 a:hover {
    color: var(--primary-purple);
}

.leader-content p {
    color: var(--text-primary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

body.ebook-feedback-active .ebook-overview {
    display: none;
}

/* E-Book Feedback */

.ebook-feedback-section {
    position: relative;
    padding: 4.5rem 0 5.5rem;
    background: transparent;
    overflow: hidden;
}

.ebook-feedback-section::before,
.ebook-feedback-section::after {
    content: none;
}

.ebook-feedback-section.is-highlighted::after {
    opacity: 0;
}

.ebook-feedback-section:not(.is-active) #ebook-chapter-grid,
.ebook-feedback-section:not(.is-active) #ebook-selection-hint,
.ebook-feedback-section:not(.is-active) .ebook-feedback-form,
.ebook-feedback-section:not(.is-active) #ebook-feedback-message,
.ebook-feedback-section:not(.is-active) .ebook-feedback-loading {
    display: none;
}

.ebook-feedback-section .container {
    position: relative;
    z-index: 1;
}

.ebook-feedback-header {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 2.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.ebook-feedback-header .section-subtitle {
    margin: 0.75rem 0 0;
    color: var(--text-secondary);
}

.ebook-feedback-header .section-helper {
    margin: 0.25rem 0 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.ebook-feedback-share-link {
    color: var(--page-accent, var(--primary-cyan));
    font-weight: 600;
    text-decoration: underline;
}

.ebook-feedback-share-link:hover {
    color: var(--page-accent-secondary, var(--primary-purple));
}

.ebook-feedback-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.ebook-feedback-actions .cta-button {
    min-width: 220px;
}

.ebook-feedback-copy-status {
    min-height: 1.2rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: color 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.ebook-feedback-copy-status[data-status] {
    opacity: 1;
}

.ebook-feedback-copy-status[data-status="success"] {
    color: var(--page-accent, var(--primary-cyan));
}

.ebook-feedback-copy-status[data-status="error"] {
    color: #ffb347;
}

@keyframes ebookFeedbackGlow {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.03);
        opacity: 0.9;
    }
    100% {
        transform: scale(1);
        opacity: 0.7;
    }
}

@media (max-width: 640px) {
    .ebook-feedback-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ebook-feedback-actions .cta-button {
        width: 100%;
    }
}

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

.chapter-feedback-card {
    position: relative;
    background: rgba(var(--surface-dark-rgb), 0.75);
    border: 1px solid rgba(0, 255, 204, 0.25);
    border-radius: 18px;
    padding: 1.8rem 1.6rem 1.6rem;
    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;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chapter-feedback-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 255, 204, 0.45);
    box-shadow: 0 20px 35px rgba(var(--surface-dark-rgb), 0.4);
}

.chapter-feedback-card.selected {
    border-color: var(--page-accent);
    background: linear-gradient(145deg, rgba(var(--surface-dark-rgb), 0.82), rgba(var(--page-accent-secondary-rgb), 0.25));
    box-shadow: 0 24px 40px rgba(var(--page-accent-rgb), 0.15);
}

.chapter-feedback-card:focus-visible {
    outline: 2px solid var(--primary-cyan);
    outline-offset: 4px;
}

.chapter-feedback-card h3 {
    color: #ffffff;
    margin: 0;
    font-size: 1.35rem;
}

.chapter-feedback-card p {
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
    font-size: 0.95rem;
}

.priority-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-purple));
    color: #001f1f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 8px 18px rgba(0, 255, 204, 0.25);
}

.chapter-feedback-details {
    border-top: 1px solid rgba(0, 255, 204, 0.25);
    padding-top: 1.25rem;
    display: none;
    flex-direction: column;
    gap: 1rem;
}

.chapter-feedback-card.selected .chapter-feedback-details {
    display: flex;
}

.chapter-feedback-details label {
    color: rgba(0, 255, 204, 0.9);
    font-weight: 600;
    font-size: 0.95rem;
}

.chapter-feedback-details textarea {
    background: rgba(0, 20, 20, 0.8);
    border: 1px solid rgba(0, 255, 204, 0.35);
    border-radius: 10px;
    color: #e9fcff;
    padding: 0.75rem 0.85rem;
    resize: vertical;
    min-height: 90px;
    font-size: 0.95rem;
}

.chapter-feedback-details textarea:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.chapter-selection-hint {
    background: rgba(0, 255, 204, 0.12);
    border: 1px solid rgba(0, 255, 204, 0.35);
    color: var(--text-secondary);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: center;
}

.chapter-selection-hint span {
    color: var(--primary-cyan);
    font-weight: 600;
}

.ebook-feedback-form {
    background: rgba(var(--surface-dark-rgb), 0.78);
    border: 1px solid rgba(0, 255, 204, 0.18);
    border-radius: 18px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    box-shadow: 0 22px 40px rgba(var(--surface-dark-rgb), 0.35);
}

.ebook-selected-summary h3 {
    color: var(--primary-cyan);
    margin-bottom: 0.6rem;
}

.ebook-selected-summary p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

#ebook-selection-summary {
    color: var(--text-secondary);
    font-size: 0.98rem;
}

.selection-summary-list {
    margin: 0;
    padding-left: 1.25rem;
    display: grid;
    gap: 0.75rem;
}

.selection-summary-list li {
    color: var(--text-secondary);
}

.selection-summary-list .summary-detail {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
    display: inline-block;
    margin-top: 0.45rem;
}

.ebook-general-feedback label,
.ebook-contact-grid label,
.ebook-additional-contact label {
    color: rgba(0, 255, 204, 0.9);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.ebook-general-feedback textarea,
.ebook-contact-grid input,
.ebook-additional-contact input {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 204, 0.28);
    background: rgba(var(--surface-dark-rgb), 0.7);
    color: #f6ffff;
    font-size: 0.95rem;
}

.ebook-general-feedback textarea {
    resize: vertical;
    min-height: 110px;
}

.ebook-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.ebook-additional-contact input::placeholder,
.ebook-contact-grid input::placeholder,
.ebook-general-feedback textarea::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.ebook-feedback-loading {
    display: none;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary-cyan);
    font-weight: 600;
}

.ebook-feedback-message {
    margin-top: 2rem;
    padding: 1.75rem;
    border-radius: 16px;
    border: 1px solid rgba(var(--page-accent-rgb), 0.3);
    background: rgba(var(--page-accent-secondary-rgb), 0.22);
    color: #e9fcff;
    display: none;
    line-height: 1.6;
}

.ebook-feedback-message.is-visible {
    display: block;
}

.ebook-feedback-message.is-success {
    border-color: rgba(var(--page-accent-rgb), 0.5);
    background: rgba(var(--page-accent-secondary-rgb), 0.35);
}

.ebook-feedback-message.is-error {
    border-color: rgba(255, 107, 107, 0.65);
    background: rgba(80, 0, 0, 0.65);
    color: #ffeaea;
}

.ebook-feedback-message.is-warning {
    border-color: rgba(255, 214, 0, 0.6);
    background: rgba(70, 50, 0, 0.65);
    color: #fff4cc;
}

.ebook-feedback-message strong {
    color: var(--primary-cyan);
}

.ebook-submit-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.ebook-submit-row .cta-button {
    min-width: 220px;
}

@media (max-width: 768px) {
    .ebook-feedback-form {
        padding: 1.75rem;
    }

    .chapter-feedback-grid {
        grid-template-columns: 1fr;
    }

    .chapter-feedback-card {
        padding: 1.5rem 1.25rem 1.25rem;
    }

    .ebook-submit-row {
        flex-direction: column;
        align-items: stretch;
    }

    .chapter-selection-hint {
        text-align: left;
    }
}

@media (max-width: 768px) {
    .leader-card {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
        padding: 2rem;
    }

    .leader-image-inner {
        width: 150px;
        height: 150px;
    }
}

.makerspace-process {
    padding: 4rem 0;
    background: transparent;
}

.makerspace-process .section-title,
.makerspace-process .section-description {
    text-align: center;
}

.makerspace-process .section-description {
    max-width: 780px;
    margin: 0 auto 2.5rem;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2.5rem;
    background: linear-gradient(160deg, rgba(0, 8, 18, 0.85), rgba(0, 28, 38, 0.72));
    border: 1px solid rgba(0, 255, 255, 0.18);
    border-radius: 18px;
    overflow: hidden;
    display: none;
}

.comparison-table thead th {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 1rem 1.25rem;
    text-align: left;
    color: var(--primary-cyan);
    background: rgba(0, 255, 255, 0.1);
}

.comparison-table tbody td {
    padding: 0.95rem 1.5rem 0.95rem 2.5rem;
    position: relative;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    vertical-align: top;
}

.comparison-table tbody tr + tr td {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.comparison-table .manual-cell {
    background: rgba(255, 68, 68, 0.08);
}

.comparison-table .manual-cell::before,
.comparison-table .automated-cell::before {
    content: "•";
    position: absolute;
    left: 1.2rem;
    top: 1.1rem;
    font-size: 1.1rem;
}

.comparison-table .manual-cell::before {
    color: #ff5a5a;
}

.comparison-table .automated-cell {
    background: rgba(0, 255, 255, 0.05);
}

.comparison-table .automated-cell::before {
    color: var(--primary-cyan);
}

.comparison-table tbody td:last-child {
    border-left: 1px solid rgba(0, 255, 255, 0.12);
}

[data-timeline] {
    --timeline-track-thickness: 60px;
    --timeline-handle-size: 60px;
    position: relative;
    margin: 0 auto 3rem;
    max-width: 960px;
    padding: 1.5rem 2rem 1.5rem;
    border-radius: 26px;
    background: linear-gradient(155deg, rgba(0, 12, 24, 0.7), rgba(0, 32, 40, 0.4));
    border: 1px solid rgba(0, 255, 255, 0.18);
    box-shadow: 0 26px 60px rgba(var(--surface-dark-rgb), 0.45);
    touch-action: none;
    width: 100%;
    opacity: 1;
    transition: opacity 0.32s ease, filter 0.32s ease;
    will-change: opacity;
}

[data-timeline].timeline--inactive {
    opacity: 0;
    pointer-events: none;
    filter: saturate(0.8) blur(0.5px);
}

.makerspace-timeline {
    --timeline-track-thickness: 60px;
    --timeline-handle-size: 60px;
}

.timeline--sbs {
    --timeline-track-thickness: 58px;
    --timeline-handle-size: 58px;
}

.timeline--concept {
    --timeline-track-thickness: 56px;
    --timeline-handle-size: 56px;
}

[data-timeline] .timeline-track {
    position: relative;
    width: 100%;
    min-height: var(--timeline-track-thickness);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(0, 16, 24, 0.95), rgba(0, 8, 16, 0.92));
    box-shadow: inset 0 0 0 1px rgba(0, 255, 255, 0.18), inset 0 18px 42px rgba(var(--surface-dark-rgb), 0.55);
    overflow: hidden;
    touch-action: none;
}

[data-timeline] .timeline-track::before {
    content: "";
    position: absolute;
    inset: 12px;
    border-radius: inherit;
    background: repeating-linear-gradient(
        90deg,
        rgba(0, 255, 255, 0.22) 0,
        rgba(0, 255, 255, 0.22) 24px,
        transparent 24px,
        transparent 48px
    );
    opacity: 0.2;
    pointer-events: none;
}

[data-timeline] {
    --timeline-progress-scale: 0;
}

[data-timeline] .timeline-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(0, 255, 255, 0.7), rgba(0, 136, 255, 0.9));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 0 36px rgba(0, 255, 255, 0.35);
    transform-origin: left center;
    transform: scaleX(var(--timeline-progress-scale));
    will-change: transform;
    transition: transform 0s;
}

[data-timeline] .timeline-handle {
    position: absolute;
    top: 50%;
    left: 0;
    width: var(--timeline-handle-size);
    height: var(--timeline-handle-size);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #01121f;
    font-size: 1.5rem;
    cursor: grab;
    background: radial-gradient(circle at 30% 30%, #f0fffb 0%, #a6fff6 45%, rgba(0, 190, 255, 0.9) 100%);
    box-shadow: 0 18px 38px rgba(0, 255, 255, 0.35), 0 0 0 6px rgba(0, 255, 255, 0.15);
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    touch-action: none;
    z-index: 3;
}

[data-timeline] .timeline-handle:focus-visible {
    outline: 3px solid rgba(0, 255, 255, 0.7);
    outline-offset: 4px;
}

[data-timeline] .timeline-handle:active {
    cursor: grabbing;
    box-shadow: 0 12px 30px rgba(0, 255, 255, 0.3), 0 0 0 4px rgba(0, 255, 255, 0.2);
    transform: translate(-50%, -50%) scale(0.97);
}

[data-timeline] .timeline-handle span {
    transform: translateX(2px);
    text-shadow: 0 4px 12px rgba(var(--surface-dark-rgb), 0.35);
}

[data-timeline] .timeline-steps {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    pointer-events: none;
    z-index: 2;
}

[data-timeline] .timeline-step-marker {
    --marker-progress: 0;
    background: none;
    border: none;
    color: var(--text-secondary);
    font: inherit;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
    pointer-events: auto;
    opacity: calc(0.55 + 0.45 * var(--marker-progress, 0));
    transition: opacity 0.25s ease, color 0.3s ease;
}

[data-timeline] .timeline-step-marker .marker-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid rgba(0, 255, 255, 0.45);
    background: rgba(var(--surface-dark-rgb), 0.8);
    box-shadow: 0 0 calc(18px * var(--marker-progress, 0)) rgba(0, 255, 255, 0.38);
    transform: scale(calc(0.8 + 0.35 * var(--marker-progress, 0)));
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

[data-timeline] .timeline-step-marker .marker-label {
    white-space: nowrap;
}

[data-timeline] .timeline-step-marker.is-active {
    color: var(--primary-cyan);
}

[data-timeline] .timeline-step-marker.is-active .marker-dot {
    background: var(--primary-cyan);
    border-color: rgba(0, 255, 255, 0.9);
}

.timeline-card-grid,
.makerspace-process-grid,
.sbs-process-grid,
.concept-timeline-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.75rem;
    margin-top: 2.5rem;
    align-items: start;
}

.process-card {
    background: rgba(var(--surface-dark-rgb), 0.78);
    border-radius: 18px;
    border: 2px solid rgba(0, 255, 255, 0.2);
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.35s ease, border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.process-card-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.process-card-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1 1 220px;
}

.process-step-indicator {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--primary-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary-cyan);
    background: rgba(var(--surface-dark-rgb), 0.85);
}

.process-step-icon {
    font-size: 2.1rem;
    line-height: 1;
}

.process-card-content {
    display: grid;
    gap: 0.85rem;
    transition: opacity 0.3s ease, transform 0.32s ease;
}

[data-timeline-card] {
    --timeline-card-progress: 0;
    --timeline-card-border-alpha: 0.2;
    --timeline-card-lift: 0;
    --timeline-card-max-height: 520px;
    border-color: rgba(0, 255, 255, var(--timeline-card-border-alpha, 0.2));
    background: linear-gradient(160deg, rgba(0, 8, 18, 0.85), rgba(0, 28, 38, 0.72));
    transform: translateY(calc(var(--timeline-card-lift, 0) * -1px));
    box-shadow: 0 calc(var(--timeline-card-lift, 0) * 1.8px) calc(var(--timeline-card-lift, 0) * 3.2px) rgba(0, 255, 255, 0.22);
}

[data-timeline-card].is-active {
    background: linear-gradient(165deg, rgba(0, 20, 32, 0.95), rgba(0, 40, 56, 0.9));
    box-shadow: 0 28px 64px rgba(0, 255, 255, 0.25);
}

[data-timeline-card] [data-timeline-card-content] {
    opacity: var(--timeline-card-progress, 0);
    transform: translateY(calc((1 - var(--timeline-card-progress, 0)) * 18px));
    max-height: calc(var(--timeline-card-progress, 0) * var(--timeline-card-max-height, 520px));
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.32s ease, max-height 0.35s ease;
}

.process-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.process-card-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.process-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.65rem;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.88);
}

.process-card ul li {
    position: relative;
    padding-left: 1.5rem;
}

.process-card ul li::before {
    content: "✔";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary-cyan);
    font-size: 0.85rem;
    transform: translateY(2px);
}

[data-timeline][data-orientation="vertical"] {
    max-width: 420px;
    width: min(100%, 420px);
    padding: 1.5rem 1.25rem 2rem;
    margin-left: auto;
    margin-right: auto;
    touch-action: pan-y;
}

[data-timeline][data-orientation="vertical"] .timeline-track {
    width: var(--timeline-track-thickness);
    min-height: 320px;
    margin: 0 auto;
    touch-action: pan-y;
}

[data-timeline][data-orientation="vertical"] .timeline-track::before {
    background: repeating-linear-gradient(
        180deg,
        rgba(0, 255, 255, 0.22) 0,
        rgba(0, 255, 255, 0.22) 24px,
        transparent 24px,
        transparent 48px
    );
}

[data-timeline][data-orientation="vertical"] .timeline-progress {
    height: 100%;
    transform-origin: center top;
    transform: scaleY(var(--timeline-progress-scale));
}

[data-timeline][data-orientation="vertical"] .timeline-steps {
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    padding: 0 0 0 calc(var(--timeline-track-thickness) + 28px);
    gap: 1.5rem;
}

[data-timeline][data-orientation="vertical"] .timeline-step-marker {
    flex-direction: row;
    gap: 0.9rem;
    opacity: calc(0.65 + 0.35 * var(--marker-progress, 0));
    align-items: center;
}

[data-timeline][data-orientation="vertical"] .timeline-step-marker .marker-label {
    white-space: normal;
    text-align: left;
    line-height: 1.35;
}

[data-timeline][data-orientation="vertical"] .timeline-direction {
    margin-top: 1.25rem;
    transform: rotate(90deg);
    text-align: center;
}

[data-timeline][data-orientation="vertical"] .timeline-direction span {
    transform: none;
}

@media (max-width: 1200px) {
    .timeline-card-grid,
    .makerspace-process-grid,
    .sbs-process-grid,
    .concept-timeline-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    [data-timeline] {
        padding: 1.5rem 1.5rem 2rem;
    }

    [data-timeline] .timeline-steps {
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    .makerspace-process .section-title,
    .makerspace-process .section-description {
        text-align: left;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .makerspace-process .section-description {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    [data-timeline] {
        display: none !important;
        margin: 0;
    }

    .timeline-card-grid,
    .makerspace-process-grid,
    .sbs-process-grid,
    .concept-timeline-grid {
        grid-template-columns: 1fr;
        justify-items: stretch;
        margin-top: 1.5rem;
        gap: 1.5rem;
        padding-left: 0;
        padding-bottom: 0;
    }

    .comparison-grid {
        display: none;
    }

    .comparison-table {
        display: table;
    }

    .comparison-table thead th {
        font-size: 0.95rem;
    }

    .comparison-table tbody td {
        font-size: 0.92rem;
        padding: 0.85rem 1.25rem 0.85rem 2.2rem;
    }

    .comparison-table .manual-cell::before,
    .comparison-table .automated-cell::before {
        top: 1rem;
    }
}

.makerspace-video-section {
    padding: clamp(3rem, 7vw, 5rem) 0;
    background: linear-gradient(135deg, rgba(5, 15, 35, 0.9), rgba(0, 40, 60, 0.6));
    border-top: 1px solid rgba(0, 255, 204, 0.18);
    border-bottom: 1px solid rgba(0, 255, 204, 0.12);
}

.makerspace-video-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(1.75rem, 5vw, 3rem);
    align-items: center;
}

.makerspace-video-text {
    display: grid;
    gap: 1rem;
}

.makerspace-video-text .section-description {
    color: rgba(255, 255, 255, 0.75);
    max-width: 540px;
}

.makerspace-video-embed {
    display: grid;
    gap: 1rem;
}

.makerspace-video-frame {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
    background: #030a12;
}

.makerspace-video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.makerspace-video-caption {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 768px) {
    .makerspace-video-card {
        text-align: left;
    }

    .makerspace-video-text .section-title {
        font-size: clamp(1.85rem, 7vw, 2.5rem);
    }
}

@media (max-width: 520px) {
    .makerspace-video-frame {
        border-radius: 16px;
    }

    .makerspace-video-caption {
        font-size: 0.9rem;
    }
}

.trust-bar__header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 1.25rem;
    min-height: 1.5rem;
}

.trust-bar__status[hidden] {
    display: none;
}

.trust-bar__status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--primary-cyan);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 0 12px rgba(0, 255, 204, 0.25);
}

.trust-bar__status--fallback {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    text-transform: none;
    box-shadow: none;
}

.trust-bar__status-dot {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: #ff4d4f;
    box-shadow: 0 0 10px rgba(255, 77, 79, 0.7);
    animation: trust-bar-pulse 1.6s ease-in-out infinite;
}

@keyframes trust-bar-pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 10px rgba(255, 77, 79, 0.6);
    }
    50% {
        transform: scale(1.18);
        opacity: 0.8;
        box-shadow: 0 0 16px rgba(255, 77, 79, 0.85);
    }
}

.trust-bar--live .trust-bar__status {
    background: rgba(0, 255, 204, 0.1);
    box-shadow: 0 0 14px rgba(0, 255, 204, 0.3);
}
