/* THRIVE Brain Logo - Thriving Neural Activity Design */

/* SIMPLE POSITIONING - No more complex variables */

.brain-logo-container {
    /* Simple container with proper layout */
    position: relative;
    width: 500px;
    height: 600px;
    margin: 0 auto; /* Center the container */
    background: transparent;
}

.thrive-brain-container {
    /* Simple absolute positioned container for brain and animations */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Ensure NO background whatsoever */
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    /* Container for all brain elements and animations */
    overflow: visible;
    pointer-events: none; /* Let clicks pass through */
}

/* Head profile DISABLED - was creating the dark square background!
.head-profile {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    height: 280px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.05) 0%, 
        rgba(255, 215, 0, 0.02) 50%, 
        transparent 100%);
    box-shadow: 
        0 0 30px rgba(255, 215, 0, 0.2),
        inset 0 0 20px rgba(255, 215, 0, 0.1);
    animation: headGlow 4s ease-in-out infinite;
}
*/

/* Brain center - NOW A CONTAINER FOR BRAIN + ANIMATIONS */
.brain-center {
    position: absolute;
    top: 50px;
    left: 50%; /* Simple center positioning */
    transform: translateX(-50%);
    width: 420px; /* Optimal size */
    height: 420px; /* Optimal size */
    /* Container for brain image and animations */
}

/* The actual brain image */
.brain-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Brain image styling */
    filter: brightness(1.1) contrast(1.1) saturate(1.2) drop-shadow(0 0 20px rgba(218, 165, 32, 0.6));
    opacity: 0.85; /* Allow animations to shine through */
    z-index: 2; /* Above animations but they can show through due to opacity */
    
    /* Ensure the image is crisp */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Direct brain without containers - SIMPLE! */
.brain-center-direct {
    max-width: 300px;
    max-height: 300px;
    filter: brightness(1.1) contrast(1.1) saturate(1.2) drop-shadow(0 0 20px rgba(218, 165, 32, 0.6));
    animation: brainPulse 3s ease-in-out infinite;
}

/* Overlay effects disabled - they create apparent background containers
.brain-center::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, 
        transparent 0%,
        transparent 40%,
        rgba(255, 215, 0, 0.1) 60%,
        rgba(255, 215, 0, 0.2) 80%,
        rgba(255, 215, 0, 0.3) 100%);
    border-radius: inherit;
    animation: brainOverlay 4s ease-in-out infinite;
    pointer-events: none;
}
*/

/* Subtle overlay animation to enhance the brain's energy */
@keyframes brainOverlay {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.7;
    }
}

/* Neural pathways */
.neural-pathway {
    position: absolute;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(218, 165, 32, 0.9) 30%,
        rgba(255, 193, 7, 1) 50%, 
        rgba(218, 165, 32, 0.9) 70%,
        transparent 100%);
    border-radius: 3px;
    opacity: 0;
    animation: neuralFire 2.2s ease-in-out infinite;
    z-index: 10; /* Behind brain so they show through it */
    box-shadow: 0 0 8px rgba(218, 165, 32, 0.4);
}

/* Multiple neural pathways - now positioned within the brain container */
.neural-pathway:nth-child(2) {
    top: 30%;
    left: 15%; /* Within brain container */
    width: 80px;
    height: 2px;
    transform: rotate(25deg);
    animation-delay: 0s;
}

.neural-pathway:nth-child(3) {
    top: 45%;
    left: 50%; /* Center of brain container */
    width: 60px;
    height: 2px;
    transform: rotate(-15deg);
    animation-delay: 0.5s;
}

.neural-pathway:nth-child(4) {
    top: 60%;
    left: 65%; /* Right side of brain container */
    width: 70px;
    height: 2px;
    transform: rotate(40deg);
    animation-delay: 1s;
}

.neural-pathway:nth-child(5) {
    top: 35%;
    left: 70%; /* Far right of brain container */
    width: 75px;
    height: 2px;
    transform: rotate(-30deg);
    animation-delay: 1.5s;
}

.neural-pathway:nth-child(6) {
    top: 55%;
    left: 75%; /* Far right of brain container */
    width: 65px;
    height: 2px;
    transform: rotate(20deg);
    animation-delay: 2s;
}

.neural-pathway:nth-child(7) {
    top: 70%;
    left: 60%; /* Right side of brain container */
    width: 55px;
    height: 2px;
    transform: rotate(-45deg);
    animation-delay: 2.5s;
}

/* Synaptic nodes - small glowing dots */
.synapse-node {
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, 
        rgba(255, 193, 7, 1) 0%, 
        rgba(218, 165, 32, 0.9) 40%, 
        rgba(218, 165, 32, 0.4) 70%,
        transparent 100%);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(218, 165, 32, 0.6);
    animation: synapsePulse 1.6s ease-in-out infinite;
    z-index: 10; /* Behind brain so they show through it */
}

/* Position synapse nodes within brain container - much simpler! */
.synapse-node:nth-child(8) {
    top: 25%;
    left: 60%;
    animation-delay: 0.1s;
    animation-duration: 1.4s;
}

.synapse-node:nth-child(9) {
    top: 40%;
    left: 80%;
    animation-delay: 0.6s;
    animation-duration: 1.8s;
}

.synapse-node:nth-child(10) {
    top: 55%;
    left: 65%;
    animation-delay: 0.9s;
    animation-duration: 1.6s;
}

.synapse-node:nth-child(11) {
    top: 35%;
    left: 40%;
    animation-delay: 1.3s;
    animation-duration: 1.5s;
}

.synapse-node:nth-child(12) {
    top: 65%;
    left: 30%;
    animation-delay: 1.8s;
    animation-duration: 1.7s;
}

/* Enhanced thought energy waves - positioned within brain container */
.thought-wave {
    position: absolute;
    top: 50%; /* Center of brain container */
    left: 50%; /* Center of brain container */
    transform: translate(-50%, -50%);
    width: 40px;  /* Small starting size */
    height: 40px;
    border: 2px solid rgba(218, 165, 32, 0.5);
    border-radius: 50%;
    animation: thoughtExpand 5s ease-out infinite;
    z-index: 3; /* Above brain image */
}

.thought-wave:nth-child(14) {
    animation-delay: 1.5s;
    border-color: rgba(218, 165, 32, 0.4);
    top: 20%;
    left: 85%;
}

.thought-wave:nth-child(15) {
    animation-delay: 3s;
    border-color: rgba(218, 165, 32, 0.3);
    top: 10%;
    left: 90%;
}

/* Energy bursts from brain center */
.energy-burst {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, 
        rgba(218, 165, 32, 1) 0%, 
        rgba(255, 193, 7, 0.8) 40%,
        transparent 70%);
    border-radius: 50%;
    animation: energyBurst 3s ease-out infinite;
}

.energy-burst:nth-child(16) {
    animation-delay: 1s;
    animation-duration: 3.5s;
}

.energy-burst:nth-child(17) {
    animation-delay: 2s;
    animation-duration: 2.5s;
}

/* Animations */
@keyframes brainPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 1.1;
    }
}

@keyframes lobePulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

@keyframes headGlow {
    0%, 100% {
        box-shadow: 
            0 0 30px rgba(255, 215, 0, 0.2),
            inset 0 0 20px rgba(255, 215, 0, 0.1);
    }
    50% {
        box-shadow: 
            0 0 40px rgba(255, 215, 0, 0.3),
            inset 0 0 30px rgba(255, 215, 0, 0.15);
    }
}

@keyframes neuralFire {
    0% {
        opacity: 0;
        transform: scaleX(0);
        filter: brightness(1);
    }
    15% {
        opacity: 0.8;
        transform: scaleX(0.4);
        filter: brightness(1.3);
    }
    35% {
        opacity: 1;
        transform: scaleX(1);
        filter: brightness(1.5);
    }
    60% {
        opacity: 0.9;
        transform: scaleX(1);
        filter: brightness(1.2);
    }
    85% {
        opacity: 0.4;
        transform: scaleX(0.8);
        filter: brightness(0.8);
    }
    100% {
        opacity: 0;
        transform: scaleX(0);
        filter: brightness(1);
    }
}

@keyframes synapsePulse {
    0%, 100% {
        transform: scale(0.8);
        opacity: 0.6;
        filter: brightness(1);
    }
    25% {
        transform: scale(1.8);
        opacity: 1;
        filter: brightness(1.4);
    }
    50% {
        transform: scale(2.2);
        opacity: 0.9;
        filter: brightness(1.6);
    }
    75% {
        transform: scale(1.4);
        opacity: 0.8;
        filter: brightness(1.2);
    }
}

@keyframes thoughtExpand {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.6;
    }
    50% {
        opacity: 0.4;
    }
    100% {
        transform: translate(-50%, -50%) scale(3);  /* Reasonable expansion */
        opacity: 0;
    }
}

@keyframes energyBurst {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0.9;
        filter: brightness(1.5);
    }
    20% {
        transform: translate(-50%, -50%) scale(4);
        opacity: 0.8;
        filter: brightness(1.3);
    }
    45% {
        transform: translate(-50%, -50%) scale(12);
        opacity: 0.5;
        filter: brightness(1.1);
    }
    70% {
        transform: translate(-50%, -50%) scale(20);
        opacity: 0.2;
        filter: brightness(0.9);
    }
    100% {
        transform: translate(-50%, -50%) scale(28);
        opacity: 0;
        filter: brightness(0.8);
    }
}

/* Brain logo text elements - BELOW BRAIN, OVER ANIMATIONS */
.brain-text-container {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    animation: fadeIn 1.5s ease-out;
    animation-delay: 0.5s;
    animation-fill-mode: both;
    z-index: 5;
    width: auto;
    /* DEBUG: Force centering with additional properties */
    margin-left: auto;
    margin-right: auto;
}

.brain-brand-name {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
    animation: glowPulse 4s ease-in-out infinite;
}

.brain-tagline {
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    color: rgba(255, 215, 0, 0.9);
    margin: 0.5rem 0 0 0;
    text-transform: uppercase;
    opacity: 0.9;
}

@keyframes glowPulse {
    0%, 100% {
        filter: brightness(1) drop-shadow(0 0 20px rgba(255, 215, 0, 0.4));
    }
    50% {
        filter: brightness(1.1) drop-shadow(0 0 30px rgba(255, 215, 0, 0.6));
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Small brain icon for navbar */
.th-brain-icon-small {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 900;
    color: #1a1a1a;
    box-shadow: 
        0 2px 8px rgba(255, 215, 0, 0.3),
        0 0 15px rgba(255, 215, 0, 0.2);
    margin-right: 0.5rem;
    vertical-align: middle;
    animation: miniPulse 3s ease-in-out infinite;
}

@keyframes miniPulse {
    0%, 100% {
        box-shadow: 
            0 2px 8px rgba(255, 215, 0, 0.3),
            0 0 15px rgba(255, 215, 0, 0.2);
    }
    50% {
        box-shadow: 
            0 2px 12px rgba(255, 215, 0, 0.4),
            0 0 20px rgba(255, 215, 0, 0.3);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .brain-logo-container {
        width: 300px;
        height: 400px;
    }
    
    .thrive-brain-container {
        width: 250px;
        height: 250px;
    }
    
    .head-profile {
        width: 230px;
        height: 230px;
    }
    
    .brain-center {
        width: 130px;
        height: 115px;
    }
    
    .brain-brand-name {
        font-size: 2.5rem;
    }
    
    .brain-tagline {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .brain-logo-container {
        width: 250px;
        height: 350px;
    }
    
    .thrive-brain-container {
        width: 200px;
        height: 200px;
    }
    
    .head-profile {
        width: 180px;
        height: 180px;
    }
    
    .brain-center {
        width: 100px;
        height: 90px;
    }
    
    .brain-brand-name {
        font-size: 2rem;
    }
    
    .brain-tagline {
        font-size: 0.8rem;
        letter-spacing: 0.15em;
    }
    
    .th-brain-icon-small {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* Thought word blocks - transformation cycle from negative to positive */
.thought-word {
    position: absolute;
    background: rgba(218, 165, 32, 0.15);
    border: 1px solid rgba(218, 165, 32, 0.4);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(218, 165, 32, 0.9);
    white-space: nowrap;
    z-index: 4; /* Above brain image */
    animation: thoughtPulse 10s ease-in-out infinite;
    opacity: 0;
    transition: all 0.5s ease-in-out;
}

/* Positive state styling */
.thought-word.positive {
    background: rgba(76, 175, 80, 0.15);
    border-color: rgba(76, 175, 80, 0.4);
    color: rgba(76, 175, 80, 0.9);
}

/* Staggered positioning and transformation timing */
.thought-word:nth-child(18) { top: 15%; left: 20%; animation-delay: 0s; }
.thought-word:nth-child(19) { top: 25%; left: 80%; animation-delay: 0.5s; }
.thought-word:nth-child(20) { top: 45%; left: 15%; animation-delay: 1s; }
.thought-word:nth-child(21) { top: 65%; left: 75%; animation-delay: 1.5s; }
.thought-word:nth-child(22) { top: 80%; left: 30%; animation-delay: 2s; }
.thought-word:nth-child(23) { top: 20%; left: 60%; animation-delay: 2.5s; }
.thought-word:nth-child(24) { top: 35%; left: 85%; animation-delay: 3s; }
.thought-word:nth-child(25) { top: 75%; left: 10%; animation-delay: 3.5s; }
.thought-word:nth-child(26) { top: 50%; left: 90%; animation-delay: 4s; }
.thought-word:nth-child(27) { top: 10%; left: 45%; animation-delay: 4.5s; }

@keyframes thoughtPulse {
    0%, 10%, 90%, 100% {
        opacity: 0;
        transform: scale(0.8);
    }
    
    20%, 80% {
        opacity: 0.9;
        transform: scale(1);
    }
    
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* Integration with existing hero section */
.hero-visual .brain-logo-container {
    transform-style: preserve-3d;
    perspective: 1000px;
}