/* Global Styles */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #CCE5FF; /* Applied the same background color to the entire page */
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styling */
header {
    margin-top: 25px;
    background-color: #CCE5FF; /* Header shares the same background color as the body */
    color: white;
    text-align: center;
    padding: 2em 1em;
}

header h1 {
    font-size: 3rem;
    margin: 0;
    color: #007bff; /* Make the title stand out with a blue color */
    margin-bottom: 50px;
}

header p {
    font-size: 1.5rem;
    margin-top: 0.5em;
    color: black;
}

/* Main Content Styling */
main {
    flex: 1; /* Makes the main content take up available space */
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 2em;
}

/* Section Styles */
.section {
    width: 30%;
    padding: 1.5em;
    margin: 1em;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    min-height: 105px;
    color: black; /* Text color is white for contrast */
}

/* Background Colors for Sections */
.section:nth-child(1) {
    background-color: #F7A886; /* Grammar */
}

.section:nth-child(2) {
    background-color: #c3c3c3; /* Linguistics */
}

.section:nth-child(3) {
    background-color: #ffd890; /* Language Skills */
}

.section:nth-child(4) {
    background-color: #97bbe4; /* Didactics */
}
.section:nth-child(5) {
    background-color: #9798e4; /* Didactics */
}
.section:nth-child(6) {
    background-color: #e49797; /* Didactics */
}
.section:nth-child(7) {
    background-color: #e4dc97; /* Didactics */
}
.section:nth-child(8) {
    background-color: #F7A886; /* Didactics */
}
.section:nth-child(9) {
    background-color: #c3c3c3; /* Didactics */
}
.section:nth-child(10) {
    background-color: #ffd890; /* Language Skills */
}

.section:hover {
    transform: translateY(-10px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Subtopics Styling */
.subtopics {
    display: none;
    margin-top: 1em;
    padding: 1em;
    background-color: rgba(255, 255, 255, 0.9); /* Slight transparency for better contrast */
    border-radius: 8px;
    border: 1px solid #ddd;
}

.subtopics a {
    display: block;
    color: #333;
    text-decoration: none;
    padding: 0.5em 0;
    font-size: 1rem;
    border-bottom: 1px solid #ddd;
    text-decoration: none;
}

.subtopics a:last-child {
    border-bottom: none;
}

.subtopics a:hover {
    color: #007bff;
    text-decoration: underline;
    text-decoration: none;
}

/* Hover Effect: Show Subtopics */
.section:hover .subtopics {
    display: block;
}

/* Footer */
footer {
    background-color: #CCE5FF; /* Same color as the body for consistency */
    color: #333;
    text-align: center;
    padding: 0.1em;
    position: sticky;
    bottom: 0;
    left: 0;
    width: 100%;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

footer p {
    font-size: 1rem;
}

/* Responsive Styles */

/* For tablets and larger phones */
@media (max-width: 768px) {
    .section {
        width: 45%;
    }
    header h1 {
    font-size: 3rem;
    }
    footer p {
        font-size: 0.5rem;
    }
}

/* For mobile phones */
@media (max-width: 480px) {
    footer h1 {
        font-size: rem;
    }

    header p {
        font-size: 1.2rem;
    }

    .section {
        width: 90%;
        margin: 0.5em 0;
    }
    footer p {
        font-size: 0.5rem;
    }
}
