/* static/css/style.css */

/* General Body Styles */
body {
    font-family: 'Inter', sans-serif; /* Using Inter font from Google Fonts */
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensures footer sticks to bottom */
    background-color: #f0f4f8; /* Default light background */
    color: #333; /* Default text color */
}

/* Page-specific background classes */
body.home-page-bg {
    background-image: url('../images/flower-1.JPEG'); /* Relative path from CSS file */
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Fixed background for parallax effect */
}

body.math-page-bg {
    background-image: url('../images/flower-2.JPEG'); /* Relative path from CSS file */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

body.science-page-bg {
    background-image: url('../images/flower-3.JPEG'); /* Example for other pages */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* General Layout for main content */
main {
    flex-grow: 1; /* Allows main content to take up available space */
    display: flex;
    justify-content: center;
    align-items: center; /* Centers content vertically and horizontally */
    padding: 20px;
}

/* Header and Footer to not shrink */
header, footer {
    flex-shrink: 0;
}

/* --- Dropdown Menu CSS --- */

/* Base style for dropdown containers */
.dropdown {
    position: relative; /* Essential for positioning dropdown content */
}

/* Desktop dropdown content */
.dropdown-content {
    display: none; /* Hidden by default */
    position: absolute;
    background-color: #2a4365; /* Darker blue for dropdown background */
    min-width: 180px; /* Minimum width for dropdown items */
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); /* Subtle shadow */
    z-index: 100; /* Ensures dropdown appears above other content */
    border-radius: 0.5rem; /* Rounded corners */
    padding: 0.5rem 0; /* Vertical padding */
    left: 0; /* Align with parent button */
    top: 100%; /* Position directly below parent button */
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none; /* Prevents interaction when hidden */
}

/* Show desktop dropdown content on hover */
.dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto; /* Allow interaction when visible */
}

/* Mobile dropdown group items (for accordion-like behavior) */
.dropdown-group-items {
    display: none; /* Hidden by default */
    background-color: #2a4365; /* Darker blue */
    padding: 0.5rem 0;
    border-radius: 0.5rem;
    margin-top: 0.25rem; /* Small space below button */
}

/* Class added by JavaScript to show dropdowns (both desktop and mobile) */
.show {
    display: block !important; /* Use !important to override 'hidden' or default 'display: none' */
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

/* Styling for dropdown links */
.dropdown-content a, .dropdown-group-items a {
    color: white;
    padding: 0.75rem 1rem;
    text-decoration: none;
    display: block;
    text-align: left;
    transition: background-color 0.2s;
}
.dropdown-content a:hover, .dropdown-group-items a:hover {
    background-color: #4a5568; /* Slightly lighter on hover */
}

/* Styling for mobile dropdown buttons */
.dropdown-group-button {
    width: 100%;
    text-align: center;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
}
.dropdown-group-button.open {
    background-color: #4a5568; /* Style for when mobile dropdown button is open */
}

/* Mobile menu specific styles */
#mobile-menu {
    width: 100%; /* Full width for mobile menu */
    text-align: center;
}
#mobile-menu a {
    width: 100%;
    text-align: center;
}
