/* Text visibility fixes */
.feature-card h3,
.feature-card p {
    color: var(--text-color);
    position: relative;
    z-index: 1;
}

.feature-hover .feature-detail {
    color: white !important;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.showcase-overlay h3,
.showcase-overlay p,
.preview-overlay h3,
.preview-overlay p {
    color: white !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Enhanced Showcase Section */
.showcase {
    padding: 6rem 0;
    background: 
        linear-gradient(135deg, rgba(13,189,198,0.05) 0%, transparent 50%),
        linear-gradient(45deg, transparent 50%, rgba(10,143,150,0.05) 100%);
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    padding: 0 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.showcase-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 16/9;
    cursor: pointer;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.showcase-item:hover {
    transform: translateY(-10px);
}

.showcase-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.showcase-item:hover img {
    transform: scale(1.1);
}

.showcase-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.9) 0%,
        rgba(0,0,0,0.7) 40%,
        rgba(0,0,0,0.4) 100%
    );
    color: white;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 1;  /* Make overlay always visible */
    transition: opacity 0.5s ease;
}

.showcase-item:hover .showcase-overlay {
    opacity: 1;
}

.showcase-overlay h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    transform: translateY(20px);
    transition: transform 0.5s ease;
}

.showcase-overlay p {
    font-size: 1.1rem;
    opacity: 0.9;
    transform: translateY(20px);
    transition: transform 0.5s ease 0.1s;
}

.showcase-item:hover .showcase-overlay h3,
.showcase-item:hover .showcase-overlay p {
    transform: translateY(0);
}

/* Boids Preview Special Styling */
.boids-preview {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--main-color) 0%, var(--accent-color) 100%);
    border-radius: 20px;
    overflow: hidden;
}

#preview-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.6;
}

.preview-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.4);  /* Darker overlay */
    color: white;
    padding: 2rem;
    opacity: 1;  /* Always visible */
    transition: opacity 0.3s ease;
    text-align: center;  /* Center text */
}

.boids-preview:hover .preview-overlay {
    opacity: 1;
}

.preview-overlay h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.preview-overlay p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.preview-button {
    padding: 1rem 2rem;
    background: white;
    color: var(--main-color);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transform: translateY(20px);
    transition: all 0.3s ease;
    display: inline-block;  /* Ensure button is visible */
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: 2px solid transparent;
}

.preview-button:hover {
    background: var(--main-color);
    color: white;
    border-color: white;
}

.preview-button:hover {
    transform: translateY(15px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Enhanced CTA Section */
.cta {
    position: relative;
    padding: 8rem 5%;
    margin-top: 4rem;
    overflow: hidden;
}

.cta-background {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--main-color) 0%, var(--accent-color) 100%);
    transform: skewY(-6deg);
    transform-origin: top left;
    z-index: -1;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: white;
    position: relative;
}

.cta-content::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, transparent 60%);
    pointer-events: none;
}

.cta-content h2 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cta-content p {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    line-height: 1.6;
}

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

.cta-buttons .cta-button {
    padding: 1.2rem 3rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: inline-block;  /* Ensure button is visible */
    min-width: 200px;  /* Give buttons a minimum width */
}

.cta-buttons .cta-button.primary {
    background: white;
    color: var(--main-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 2px solid white;
}

.cta-buttons .cta-button.secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.cta-buttons .cta-button.primary:hover {
    background: var(--main-color);
    color: white;
    border-color: white;
}

.cta-buttons .cta-button.secondary:hover {
    background: white;
    color: var(--main-color);
}

.cta-buttons .cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .showcase-grid {
        grid-template-columns: 1fr;
        padding: 0 1.5rem;
    }
    
    .cta {
        padding: 6rem 1.5rem;
    }
    
    .cta-content h2 {
        font-size: 2.5rem;
    }
    
    .cta-content p {
        font-size: 1.1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cta-buttons .cta-button {
        width: 100%;
        text-align: center;
    }
}
