/* Basic resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f0f0f0;
    color: #333;
}

/* Quiz box that acts as a background to the grid */
.quiz-box {
    background-color: rgba(0, 0, 0, 0.8);
    padding: 20px 20px; /* Reduced padding for a smaller "Start Here" section */
    max-width: 100%; /* Full width to act as background */
    margin: 0 auto;
    text-align: center;
    color: white;
    box-sizing: border-box; /* Padding included in width */
}

/* Center text alignment and bounce animation */
.quiz-text-align-center {
    text-align: center;
}

.quiz-animated-bounce {
    animation: bounce 1.5s infinite;
}

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

/* Step 1 bold text */
.quiz-text-align-center.quiz-animated-slide-in-left span {
    font-weight: bold; /* Bold "Step 1" text */
}

/* 2x2 Grid inside the quiz-box */
.quiz-grid-layout {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columns */
    grid-gap: 25px; /* Increased spacing between grid items */
    max-width: 450px;
    margin: 0 auto; /* Center the grid */
    padding: 0;
    box-sizing: border-box;
}

/* Grid item styling */
.quiz-grid-item {
    position: relative;
    padding: 20px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    box-shadow: 0 8px 16px rgba(255, 255, 255, 0.2); /* Light drop shadow */
    aspect-ratio: 1 / 1.2; /* Adjusted aspect ratio */
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.6); /* Border around each image */
}

/* Gradient overlay on top of the images */
.quiz-grid-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.4), rgba(43, 43, 43, 0.6)); /* Grey gradient overlay */
    z-index: 1;
    border-radius: 10px;
}

/* Ensure text and buttons are above the gradient */
.quiz-grid-item * {
    position: relative;
    z-index: 2;
}

/* Text shadow behind the text for readability */
.quiz-grid-item h2, .quiz-grid-item p {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8); /* Strong black shadow */
}

/* Background images */
.quiz-grid-item:nth-child(1) {
    background-image: url('https://www.thefitclass.co.uk/sites/default/files/inline-images/online_personal_trainer_for_weight_loss.jpeg');
}
.quiz-grid-item:nth-child(2) {
    background-image: url('https://www.thefitclass.co.uk/sites/default/files/inline-images/online_personal_trainer_for_muscle_building.jpeg');
}
.quiz-grid-item:nth-child(3) {
    background-image: url('/sites/default/files/inline-images/online_personal_trainer_for_fitness.jpeg');
}
.quiz-grid-item:nth-child(4) {
    background-image: url('/sites/default/files/inline-images/online_personal_trainer_for_flexibility.jpeg');
}

/* Font sizes for readability */
.quiz-grid-item h2 {
    font-size: 2rem;
}

.quiz-grid-item p {
    font-size: 1.2rem;
    color: #ddd;
}

/* Button with blue gradient */
.quiz-button {
    margin-top: 10px;
    padding: 6px 16px; /* Reduced padding for smaller buttons */
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px; /* Smaller button font */
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Button hover effect */
.quiz-button:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .quiz-grid-layout {
        grid-gap: 15px; /* Adjusted grid-gap for smaller screens */
        grid-template-columns: 1fr 1fr; /* Keep 2 columns */
    }

    .quiz-grid-item {
        padding: 15px;
        aspect-ratio: 1 / 1.2;
    }

    .quiz-grid-item h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .quiz-grid-layout {
        grid-template-columns: 1fr 1fr; /* Keep 2 columns on mobile */
        grid-gap: 10px;
        padding: 0;
    }

    .quiz-grid-item {
        padding: 10px;
        aspect-ratio: 1 / 1.25;
    }

    .quiz-grid-item h2 {
        font-size: 1.5rem;
    }

    .quiz-grid-item p {
        font-size: 1rem;
    }
}
