/* ===================================
   Homepage Enhanced Styles
   Books as Foundation Pillars
   Progressive Engagement
   =================================== */

/* ==========================================
   BOOKS FOUNDATION - The Two Pillars
   ========================================== */
.books-foundation {
    padding: 8rem 2rem;
    background: rgba(26, 26, 46, 0.3);
    position: relative;
    overflow: hidden;
}

.books-foundation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, 
        transparent 0%, 
        var(--accent-color) 20%, 
        var(--accent-color) 80%, 
        transparent 100%);
    opacity: 0.3;
}

.foundation-intro {
    text-align: center;
    margin-bottom: 4rem;
}

.foundation-intro h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent-color), #00ffaa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.foundation-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* ==========================================
   PILLARS LAYOUT
   ========================================== */
.books-pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.book-pillar {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 3rem 2rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Pillar Glow Effect */
.pillar-glow {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
    z-index: 0;
}

.book-pillar:hover .pillar-glow {
    opacity: 0.4;
}

.book-pillar:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    box-shadow: 0 20px 60px var(--accent-glow);
}

/* Book Cover */
.book-pillar img {
    width: 80%;
    max-width: 300px;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
}

.book-pillar:hover img {
    transform: scale(1.05);
    box-shadow: 0 15px 50px rgba(0, 217, 255, 0.3);
}

/* Book Info */
.book-info {
    text-align: center;
    position: relative;
    z-index: 1;
}

.book-info h3 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--accent-color);
}

.book-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-style: italic;
    line-height: 1.4;
}

.book-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
    text-align: left;
    padding: 0 1rem;
}

/* Book Actions */
.book-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.book-link {
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    font-size: 0.95rem;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.book-link.explore {
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    background: transparent;
}

.book-link.explore:hover {
    background: rgba(0, 217, 255, 0.1);
    transform: translateX(5px);
}

.book-link.order {
    background: linear-gradient(135deg, var(--accent-color), #00ffaa);
    color: var(--primary-bg);
    border: none;
    box-shadow: 0 4px 15px var(--accent-glow);
    opacity: 0.85;
    transition: all 0.3s ease;
}

.book-link.order:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--accent-glow);
}

/* Progressive Engagement - Order button becomes more prominent */
.book-link.order.engaged {
    animation: pulse-order 2s infinite;
    opacity: 1;
}

@keyframes pulse-order {
    0%, 100% {
        box-shadow: 0 4px 15px var(--accent-glow);
    }
    50% {
        box-shadow: 0 6px 30px var(--accent-glow);
        transform: scale(1.02);
    }
}

/* Foundation Footer */
.foundation-footer {
    text-align: center;
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(0, 217, 255, 0.2);
}

.foundation-tagline {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-style: italic;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==========================================
   JOURNEY PATHS - Choose Your Path
   ========================================== */
.journey-paths {
    padding: 6rem 2rem;
    background: rgba(26, 26, 46, 0.3);
}

.journey-paths h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
}

.paths-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.path-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

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

.path-card:hover::before {
    left: 100%;
}

.path-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-10px);
    box-shadow: 0 15px 40px var(--accent-glow);
}

.path-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px var(--accent-glow));
}

.path-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--accent-color);
}

.path-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.path-arrow {
    color: var(--accent-color);
    font-size: 1.5rem;
    opacity: 0;
    transition: var(--transition);
    position: absolute;
    bottom: 1.5rem;
}

.path-card:hover .path-arrow {
    opacity: 1;
    transform: translateX(5px);
}

/* ==========================================
   CTA SECTION ENHANCED
   ========================================== */
.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button-secondary {
    background: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    padding: 1.25rem 3rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-button-secondary:hover {
    background: rgba(0, 217, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 30px var(--accent-glow);
}

/* ==========================================
   ENGAGEMENT TOOLTIP
   ========================================== */
.engagement-hint {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--card-bg);
    border: 1px solid var(--accent-color);
    padding: 1rem 2rem;
    border-radius: 30px;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9995;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

.engagement-hint.show {
    bottom: 2rem;
}

.engagement-hint::before {
    content: '📖';
    margin-right: 0.75rem;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 768px) {
    .books-pillars {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .book-pillar {
        padding: 2rem 1.5rem;
    }

    .book-pillar img {
        width: 70%;
    }

    .foundation-intro h2 {
        font-size: 2rem;
    }

    .foundation-subtitle {
        font-size: 1rem;
    }

    .paths-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .book-actions {
        flex-direction: column;
        width: 100%;
    }

    .book-link {
        width: 100%;
        text-align: center;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .engagement-hint {
        white-space: normal;
        max-width: calc(100vw - 4rem);
        text-align: center;
    }
}

@media (max-width: 480px) {
    .books-foundation {
        padding: 4rem 1rem;
    }

    .foundation-intro h2 {
        font-size: 1.75rem;
    }

    .book-info h3 {
        font-size: 1.5rem;
    }

    .book-description {
        padding: 0;
    }
}

/* ==========================================
   SCROLL INDICATOR ON HERO
   ========================================== */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--accent-color);
    font-size: 2rem;
    animation: bounce 2s infinite;
    cursor: pointer;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ==========================================
   BOOK MODAL
   ========================================== */
.book-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.book-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    cursor: pointer;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background: var(--card-bg);
    border: 1px solid var(--accent-color);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8),
                0 0 40px var(--accent-glow);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: var(--text-primary);
    font-size: 2rem;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--accent-color);
    color: var(--primary-bg);
    transform: rotate(90deg);
}

.modal-body {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    padding: 3rem;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-cover {
    position: sticky;
    top: 0;
}

.modal-cover img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.modal-info h2 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--accent-color), #00ffaa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modal-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.modal-description {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.modal-description p {
    margin-bottom: 1.5rem;
}

.modal-description p:last-child {
    margin-bottom: 0;
}

.modal-actions {
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 217, 255, 0.2);
}

.modal-order-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-color), #00ffaa);
    color: var(--primary-bg);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.125rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 20px var(--accent-glow);
    transition: var(--transition);
}

.modal-order-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px var(--accent-glow);
}

/* Scrollbar for modal */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 968px) {
    .books-pillars {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .books-foundation {
        padding: 4rem 1rem;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .foundation-intro h2 {
        font-size: 2rem;
    }
    
    .foundation-subtitle {
        font-size: 1rem;
    }
    
    .book-pillar {
        padding: 2rem 1.5rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .book-cover-container img {
        max-width: 200px;
    }
    
    .book-pillar h3 {
        font-size: 1.5rem;
    }
    
    /* Modal Responsive */
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .modal-body {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 1.5rem;
    }

    .modal-cover {
        position: relative;
    }

    .modal-cover img {
        max-width: 250px;
        margin: 0 auto;
        display: block;
    }

    .modal-info h2 {
        font-size: 1.5rem;
    }

    .modal-subtitle {
        font-size: 1rem;
    }

    .modal-description {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .foundation-intro h2 {
        font-size: 1.75rem;
    }
    
    .book-pillar {
        padding: 1.5rem 1rem;
    }
    
    .book-cover-container img {
        max-width: 180px;
    }
    
    .book-pillar h3 {
        font-size: 1.25rem;
    }
    
    .modal-body {
        padding: 1.5rem 1rem;
    }

    .modal-close {
        width: 35px;
        height: 35px;
        font-size: 1.5rem;
    }
    
    .book-pillar-btn,
    .order-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* ==========================================
   FEATURED PATH - Die Reise ins Unendliche
   ========================================== */
.path-featured {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.1), rgba(0, 255, 170, 0.05));
    border: 1px solid rgba(0, 217, 255, 0.4);
    position: relative;
    overflow: hidden;
}

.path-featured::after {
    content: 'NEU';
    position: absolute;
    top: 15px;
    right: -30px;
    background: linear-gradient(135deg, var(--accent-color), #00ffaa);
    color: var(--primary-bg);
    padding: 4px 40px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    transform: rotate(45deg);
}

.path-featured .path-icon {
    font-size: 4rem;
    background: linear-gradient(135deg, var(--accent-color), #00ffaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: infinity-pulse 3s ease-in-out infinite;
}

@keyframes infinity-pulse {
    0%, 100% { 
        filter: drop-shadow(0 0 10px var(--accent-glow));
        transform: scale(1);
    }
    50% { 
        filter: drop-shadow(0 0 25px var(--accent-glow));
        transform: scale(1.1);
    }
}

.path-featured:hover {
    border-color: var(--accent-color);
    box-shadow: 0 15px 50px rgba(0, 217, 255, 0.3),
                inset 0 0 30px rgba(0, 217, 255, 0.05);
}
