/* ------------------------------
     Global Reset & Base
------------------------------ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, #main {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f9;
    color: #222;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ------------------------------
     Header
------------------------------ */
.header {
	position: relative;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: #fff;
    text-align: center;
    padding: 3rem 1rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.header p {
	position: absolute;
	bottom: 15px;
	left: 15px;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ------------------------------
     Subjects Section
------------------------------ */
.main {
    flex: 1;
    padding: 2rem 1rem 4rem;
}

.subjects-section {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.subjects-section h2 {
    font-size: 1.8rem;
    color: #1e3a8a;
    margin-bottom: 1.5rem;
}

/* ------------------------------
     Subjects Grid
------------------------------ */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    justify-content: center;
}

.subject-card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.subject-card h4 {
    display: block;
    padding: 1.5rem;
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
}

.subject-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

/* ------------------------------
     Footer
------------------------------ */
.footer {
    background: #1e3a8a;
    color: #fff;
    text-align: center;
    padding: 1.2rem;
    font-size: 0.95rem;
    margin-top: auto;
}

.footer p {
    margin: 0;
}

/* ------------------------------
     Responsive Design
------------------------------ */
@media (max-width: 600px) {
    .header h1 {
        font-size: 1.6rem;
    }
    
    .subjects-section h2 {
        font-size: 1.4rem;
    }
    
    .subject-card a {
        font-size: 1rem;
        padding: 1rem;
    }
}

#back-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    background-color: #ffffff;
    color: #0078ff;
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 15px;
    font-family: "Segoe UI", Arial, sans-serif;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    transition: background-color 0.2s, transform 0.15s;
    z-index: 1000;
}

#back-btn:hover {
    background-color: #e8f0ff;
    transform: translateY(-2px);
}

#back-btn:active {
    background-color: #d0e2ff;
    transform: translateY(0);
}

#back-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4);
}