/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body, html {
    min-height: 100%;
    overflow-y: auto;
}

/* Background image with opacity */
.background {
    background: url('images/background.jpeg') no-repeat center center fixed;
    background-size: cover;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    opacity: 0.2;
    z-index: -1;
}

/* Page title styling */
.page-title {
    position: relative;
    width: 100%;
    text-align: center;
    font-size: 40px;
    font-weight: bold;
    color: black;
    padding: 20px 0;
    margin-bottom: 20px;
    /* White stroke outline for readability */
    text-shadow:
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        1px 1px 0 #fff;
}

/* Main layout container */
.container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    margin-top: 20px;
}

/* Button grid layout */
.button-grid {
    display: grid;
    grid-template-columns: repeat(3, 250px);
    gap: 20px;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    grid-auto-flow: row;
    grid-auto-rows: 250px;
}

/* Button styling */
.button {
    width: 250px;
    height: 250px;
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    text-decoration: none;
    color: black;
    transition: transform 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 15px;
}

/* Special styling for study button */
.study-button {
    background-color: #1a5f1a; /* Dark green background */
}

.study-button .button-label {
    color: white;
}

.button:hover {
    transform: scale(1.05);
}

/* Text above the image */
.button-label {
    text-align: center;
    padding: 2px;
    font-size: 18px;
    line-height: 1.2;
    margin-bottom: 15px;
}

/* Image inside button */
.button img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

/* Responsive Design Adjustments */
@media screen and (max-width: 1200px) {
    .button-grid {
        grid-template-columns: repeat(3, 250px);
    }
}

@media screen and (max-width: 768px) {
    body, html {
        overflow-y: auto;
        overflow-x: hidden;
    }

    .page-title {
        font-size: 28px;
        padding: 15px 10px;
        margin-bottom: 15px;
    }

    .container {
        padding: 15px;
        margin-top: 15px;
    }

    .button-grid {
        grid-template-columns: repeat(2, 250px);
        gap: 15px;
    }

    .button {
        width: 45vw;
        height: 45vw;
        max-width: 200px;
        max-height: 200px;
        padding-top: 10px;
    }

    .button-label {
        font-size: 14px;
        padding: 2px;
        margin-bottom: 8px;
    }

    .button img {
        width: 100px;
        height: 100px;
    }
}

@media screen and (max-width: 480px) {
    .page-title {
        font-size: 24px;
        padding: 10px;
        margin-bottom: 10px;
    }

    .container {
        padding: 10px;
        margin-top: 10px;
    }

    .button-grid {
        grid-template-columns: 1fr;
    }

    .button {
        width: 70vw;
        height: 70vw;
        max-width: 250px;
        max-height: 250px;
    }

    .button-label {
        font-size: 15px;
        margin-bottom: 12px;
    }
}
