/* Global Reset & Styling */
* {
    box-sizing: border-box; /* Prevents padding from breaking layouts */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f4f8; 
    color: #334155; 
    margin: 0;
    padding: 0;
    line-height: 1.6;
    display: block; /* Forces top-to-bottom stacking */
}

/* Header */
header {
    background-color: #475569; 
    color: #ffffff;
    text-align: center;
    padding: 40px 20px;
    display: block;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 400;
    letter-spacing: 1px;
}

/* Navigation Menu */
nav {
    background-color: #64748b; 
    display: flex;
    justify-content: center;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

nav a {
    color: white;
    text-decoration: none;
    margin: 0 25px;
    font-size: 1.1rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

nav a:hover {
    color: #e2e8f0; 
}

/* Main Content Container */
main {
    max-width: 1100px;
    margin: 40px auto; /* This centers the whole grid block on the page */
    padding: 0 20px;
    display: block;
}

/* Section Styling & Centered Titles */
section {
    margin-bottom: 60px;
}

section h2 {
    text-align: center;
    color: #334155;
    margin-bottom: 35px;
    font-weight: 400;
    font-size: 2rem;
}

/* Grid Layout for Panels */
.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns in a row */
    gap: 25px; 
}

/* Individual Panel Styling (Perfect Squares) */
.panel {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    aspect-ratio: 1 / 1; /* Forces perfect squares */
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none; 
    color: #475569;
    font-weight: 600;
    font-size: 1.2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.panel:hover {
    transform: translateY(-5px); 
    box-shadow: 0 8px 15px rgba(0,0,0,0.08);
    background-color: #f8fafc;
}

/* Responsive Design (Phones & Tablets) */
@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr); 
    }
}
@media (max-width: 480px) {
    .grid-container {
        grid-template-columns: 1fr; 
    }
    nav {
        flex-direction: column;
        align-items: center;
    }
    nav a {
        margin: 10px 0;
    }
}