/* --- DEMOS PAGE STYLES --- */

/* Container for the demos content */
.demos-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

.demos-header {
    text-align: center;
    margin-bottom: 3rem;
}

.demos-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--text-primary), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.demos-header p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Grid Layout for Cards */
.demos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

/* Individual Card Styling */
.demo-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.demo-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    border-color: rgba(56, 189, 248, 0.3);
}

/* Card Image */
.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Card Content */
.card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.card-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    flex-grow: 1; /* Pushes the button to the bottom */
}

/* Card Link/Button */
.card-link {
    display: inline-block;
    text-align: center;
    background-color: rgba(56, 189, 248, 0.1);
    color: var(--accent-color);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.card-link:hover {
    background-color: var(--accent-color);
    color: #fff;
    box-shadow: 0 0 15px var(--accent-glow);
}

/* --- MOBILE RESPONSIVENESS FOR DEMOS PAGE --- */

@media (max-width: 600px) {
    /* Reduce padding on the sides so the cards have more room */
    .demos-content {
        padding: 1rem;
    }

    /* Force the grid to be a single column */
    .demos-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Resize images: slightly shorter on mobile to save screen space */
    .card-image {
        height: 180px; 
    }

    /* Adjust text sizes for better readability on small screens */
    .demos-header h2 {
        font-size: 2rem;
    }

    .card-title {
        font-size: 1.1rem;
    }

    .card-description {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    /* Make the button stretch full width for easier tapping */
    .card-link {
        width: 100%;
        box-sizing: border-box; /* Ensures padding doesn't overflow width */
    }
}