/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Typography */
.section-title {
    font-family: 'Dancing Script', cursive;
    font-size: 2.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3.5rem;
    color: #2c3e50;
    position: relative;
    padding-top: 3rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* Demo Section */
.demo-section {
    padding: 4rem 0;
    background: #f8f9fa;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.gallery-item.card {
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Ensure cards in a row have equal height */
}

.gallery-item.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.card-img-top {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.card-body {
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
    /* Pushes button to the bottom */
}

.card-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 0.75rem;
}

.card-text {
    font-size: 0.95rem;
    color: #7f8c8d;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    /* Allows text to take available space */
}

.demo-section .btn.btn-primary {
    display: inline-block;
    padding: 0.75rem 2.25rem;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 8px;
    background-color: #667eea;
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    margin-top: auto;
    /* Pushes button to the bottom of the card-body */
}

.demo-section .btn.btn-primary:hover {
    background-color: #764ba2;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Responsive Design */
@media (max-width: 992px) {
    .section-title {
        font-size: 2.5rem;
    }

    .gallery-grid {
        gap: 1.5rem;
    }

    .card-img-top {
        height: 450px;
    }

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

    .card-text {
        font-size: 0.9rem;
    }

    .demo-section .btn.btn-primary {
        padding: 0.6rem 2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2.2rem;
        margin-bottom: 2.5rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.25rem;
    }

    .card-img-top {
        height: 400px;
    }

    .card-body {
        padding: 1.2rem;
    }

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

    .card-text {
        font-size: 0.85rem;
    }

    .demo-section .btn.btn-primary {
        padding: 0.5rem 1.8rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
        padding-top: 2rem;
    }

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

    .card-img-top {
        height: 500px;
    }

    .card-body {
        padding: 1rem;
    }

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

    .card-text {
        font-size: 0.9rem;
    }

    .demo-section .btn.btn-primary {
        padding: 0.6rem 2rem;
        font-size: 0.9rem;
    }

    .container {
        padding: 0 0.75rem;
    }
}