/* --- Global Styles & Variables --- */
:root {
    --primary-color: #003366;
    /* Deep Blue */
    --secondary-color: #FDB813;
    /* Gold/Yellow Accent */
    --text-color: #333;
    --light-gray: #f4f4f4;
    --white: #ffffff;
    --header-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header --- */
header {
    background: var(--white);
    height: var(--header-height);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
}

.main-nav a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    transition: color 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--secondary-color);
}

.cta-button {
    background: var(--secondary-color);
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease;
}

.cta-button:hover {
    background: #e9a802;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

/* --- Hero Section --- */
.hero {
    height: calc(100vh - var(--header-height));
    /* FIX: Uses the cropped-cropped-school-building1 image */
    background: linear-gradient(rgba(0, 51, 102, 0.7), rgba(0, 51, 102, 0.7)), url('img/cropped-cropped-school-building1-768x512.jpg') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin-bottom: 30px;
}

.cta-button-large {
    background: var(--secondary-color);
    color: var(--primary-color);
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: background 0.3s ease;
}

.cta-button-large:hover {
    background: #e9a802;
}

/* --- Highlights Section --- */
.highlights {
    padding: 80px 0;
}

.highlights .container {
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.highlight-card {
    text-align: center;
    padding: 30px;
    border-radius: 10px;
    background: var(--white);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.highlight-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.highlight-card h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* --- Portals Section (Layout Fix) --- */
.portals {
    padding: 80px 0;
    text-align: center;
}

.portals h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.portal-card {
    display: block;
    text-align: center;
    padding: 30px;
    border-radius: 10px;
    background: var(--white);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.portal-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.portal-card h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.portal-card p {
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.portal-card span {
    font-weight: 600;
    color: var(--secondary-color);
    display: block;
    margin-top: 10px;
}

/* --- News Section --- */
.news {
    padding: 80px 0;
    background: var(--light-gray);
}

.news h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 50px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.news-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.news-content {
    padding: 25px;
}

.news-content span {
    font-size: 0.9rem;
    color: #777;
}

.news-content h3 {
    font-size: 1.2rem;
    margin: 10px 0;
}

.news-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* --- Footer --- */
footer {
    background: var(--primary-color);
    color: var(--white);
    padding-top: 60px;
}

footer .container {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-col {
    flex: 1;
    min-width: 250px;
}

.footer-col h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: var(--secondary-color);
}

.social-icons a {
    font-size: 1.5rem;
    margin-right: 15px;
}

.footer-bottom {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    border-top: 1px solid #1a4775;
}

/* --- Styles for About Page --- */
.page-header {
    background: var(--primary-color);
    padding: 40px 0;
    text-align: center;
    color: var(--white);
}

.page-header h1 {
    font-size: 2.5rem;
}

.page-content {
    padding: 80px 0;
}

.content-block {
    max-width: 900px;
    margin: 0 auto 60px auto;
    /* Center the block and add space below */
}

.content-block h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

.content-block p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    line-height: 1.8;
}

.content-block-split {
    display: flex;
    gap: 40px;
}

.split-text {
    flex: 1;
    /* Each takes up half the space */
}

.split-text h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* --- Styles for Academics Page --- */
.program-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.program-card {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    border-left: 5px solid var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.program-card i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.program-card h3 {
    font-size: 1.6rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.program-card p {
    font-size: 1rem;
    line-height: 1.7;
}

.cta-banner {
    background: var(--primary-color);
    color: var(--white);
    padding: 50px;
    text-align: center;
    border-radius: 10px;
    margin: 60px 0 0 0;
}

.cta-banner h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.cta-banner p {
    font-size: 1.1rem;
    margin-bottom: 25px;
}

/* --- Styles for Admissions Page --- */
.admission-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.step-card {
    background: var(--light-gray);
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    border-top: 4px solid var(--secondary-color);
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 20px auto;
}

.step-card h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 10px;
}

/* --- Application Form Styles --- */
.application-form {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    margin-top: 60px;
}

.application-form h2 {
    text-align: center;
    color: var(--primary-color);
    font-size: 2.2rem;
    margin-bottom: 30px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
    /* Span full width */
}

.form-group label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
}

.form-group button {
    width: 100%;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    background: var(--secondary-color);
    color: var(--primary-color);
    border-radius: 5px;
    transition: background 0.3s ease;
}

.form-group button:hover {
    background: #e9a802;
}

/* --- Styles for Campus Life Page --- */
.facility-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
}

.facility-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.facility-card:hover {
    transform: translateY(-5px);
}

.facility-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.facility-card h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    padding: 20px 20px 10px 20px;
}

.facility-card p {
    padding: 0 20px 20px 20px;
    font-size: 0.95rem;
}

/* --- Gallery Grid --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item span {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 51, 102, 0.8), transparent);
    color: var(--white);
    padding: 20px 15px 15px 15px;
    font-weight: 600;
    font-size: 1.1rem;
    box-sizing: border-box;
}

/* --- Styles for Contact Page --- */
.contact-layout {
    display: flex;
    gap: 40px;
}

.contact-form-container {
    flex: 2;
    /* Form takes 2/3 of the space */
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
}

.contact-info-container {
    flex: 1;
    /* Info takes 1/3 of the space */
}

.contact-form-container h2,
.contact-info-container h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.contact-form-container p,
.contact-info-container p {
    margin-bottom: 30px;
}

/* --- Contact Form Styling --- */
.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.contact-form .form-group {
    display: flex;
    flex-direction: column;
}

.contact-form .form-group.full-width {
    grid-column: 1 / -1;
}

.contact-form .form-group label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.contact-form .form-group input,
.contact-form .form-group select,
.contact-form .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
}

.contact-form .form-group textarea {
    resize: vertical;
}

.contact-form .form-group button {
    width: 100%;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    background: var(--secondary-color);
    color: var(--primary-color);
    border-radius: 5px;
    transition: background 0.3s ease;
}

.contact-form .form-group button:hover {
    background: #e9a802;
}

/* --- Contact Info Item Styling --- */
.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
    font-size: 1.1rem;
}

.contact-info-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 5px;
    width: 30px;
    text-align: center;
}

/* --- Map Container --- */
.map-container {
    margin-top: 60px;
}

.map-container h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

/* --- Styles for Thank You Page --- */
.greeting-box {
    max-width: 600px;
    margin: 0 auto;
    background: #f9f9f9;
    padding: 50px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.greeting-box i {
    font-size: 5rem;
    color: #28a745;
    /* Green checkmark */
    margin-bottom: 20px;
}

.greeting-box h1 {
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.greeting-box p {
    font-size: 1.1rem;
    line-height: 1.7;
}

/* --- Styles for Parent Portal Page --- */
.portal-login-container {
    max-width: 500px;
    margin: 0 auto;
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.portal-form i {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.portal-form h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.portal-form p {
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.portal-form .form-group {
    text-align: left;
    margin-bottom: 20px;
}

.portal-form .form-group.full-width {
    margin-bottom: 0;
}

.portal-form .form-group label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    display: block;
}

.portal-form .form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
}

.portal-form .form-group button {
    width: 100%;
    margin-top: 15px;
}

.portal-links {
    margin-top: 25px;
    display: flex;
    justify-content: space-between;
}

.portal-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.portal-links a:hover {
    text-decoration: underline;
}

/* --- Style for Login Error Message --- */
.login-error {
    background: #f8d7da;
    /* Light red */
    color: #721c24;
    /* Dark red */
    border: 1px solid #f5c6cb;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-weight: 600;
}

/* --- Styles for Parent Dashboard --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.dashboard-card {
    background: var(--light-gray);
    padding: 30px;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.dashboard-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.dashboard-card h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.dashboard-card p {
    margin-bottom: 25px;
}

.dashboard-card .cta-button {
    background: var(--primary-color);
    color: var(--white);
    transition: background 0.3s ease;
}

.dashboard-card .cta-button:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
}

/* --- Styles for Report Card Page --- */
.report-card-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    border: 1px solid #ddd;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border-radius: 10px;
}

.report-header {
    text-align: center;
    padding: 30px;
    border-bottom: 2px solid var(--primary-color);
}

.report-header h2 {
    color: var(--primary-color);
    font-size: 2.2rem;
    margin-bottom: 5px;
}

.report-header p {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 20px;
}

.student-info {
    text-align: left;
    display: inline-block;
    font-size: 1.1rem;
    line-height: 1.8;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.report-table th,
.report-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.report-table thead th {
    background: var(--light-gray);
    color: var(--primary-color);
    font-size: 1.1rem;
}

.report-table tbody tr:hover {
    background: #fcfcfc;
}

.report-table tfoot th {
    background: var(--light-gray);
    font-size: 1.1rem;
}

.report-footer {
    padding: 30px;
    text-align: right;
}

.report-footer p {
    text-align: left;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.report-footer .cta-button {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    cursor: pointer;
}

/* --- Styles for Attendance Page --- */
.attendance-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    border: 1px solid #ddd;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border-radius: 10px;
}

.attendance-header {
    padding: 30px 30px 20px 30px;
    border-bottom: 1px solid #eee;
}

.attendance-header h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0;
}

.attendance-header p {
    font-size: 1.1rem;
    margin: 5px 0 0 0;
}

.attendance-summary {
    display: flex;
    gap: 20px;
    padding: 30px;
    justify-content: space-around;
    background: var(--light-gray);
}

.summary-box {
    flex: 1;
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    color: var(--white);
}

.summary-box .count {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
}

.summary-box span {
    font-weight: 600;
}

.summary-box.present {
    background: #28a745;
}

/* Green */
.summary-box.absent {
    background: #dc3545;
}

/* Red */
.summary-box.leave {
    background: #ffc107;
    color: #333;
}

/* Yellow */

.attendance-table {
    width: 100%;
    border-collapse: collapse;
}

.attendance-table th,
.attendance-table td {
    padding: 15px 30px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.attendance-table thead th {
    background: #fdfdfd;
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* Status Badges */
.status-present,
.status-absent,
.status-leave {
    padding: 5px 10px;
    border-radius: 5px;
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
}

.status-present {
    background: #28a745;
}

.status-absent {
    background: #dc3545;
}

.status-leave {
    background: #ffc107;
    color: #333;
}

/* --- Styles for Fee Challan Page --- */
.challan-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    border: 2px solid var(--primary-color);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border-radius: 10px;
}

.challan-header {
    text-align: center;
    padding: 30px;
    border-bottom: 2px solid var(--primary-color);
    background: var(--light-gray);
}

.challan-header h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 5px;
}

.challan-header p {
    font-size: 1.2rem;
    color: #555;
    font-weight: 600;
}

.challan-details {
    display: flex;
    justify-content: space-between;
    padding: 30px;
    font-size: 1.1rem;
    line-height: 1.8;
    border-bottom: 1px dashed #999;
}

.fee-table {
    width: 100%;
    border-collapse: collapse;
}

.fee-table th,
.fee-table td {
    padding: 15px 30px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.fee-table thead th {
    background: var(--light-gray);
    color: var(--primary-color);
    font-size: 1.1rem;
}

.fee-table tfoot th {
    font-size: 1.2rem;
    text-align: right;
    color: var(--primary-color);
}

.fee-table tfoot th:first-child {
    text-align: right;
}

.challan-footer {
    padding: 30px;
    text-align: right;
    background: var(--light-gray);
}

.challan-footer p {
    text-align: left;
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 20px;
}

.challan-footer .cta-button {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    cursor: pointer;
}

/* --- Styles for Messages Page --- */
.message-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    background: var(--white);
    border: 1px solid #ddd;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    overflow: hidden;
    min-height: 600px;
}

.message-list {
    flex: 1;
    /* Takes 1/3 width */
    border-right: 1px solid #eee;
    background: #fdfdfd;
}

.message-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.message-item:hover {
    background: #f4f4f4;
}

.message-item.active {
    background: var(--light-gray);
    border-right: 3px solid var(--primary-color);
}

.message-sender {
    font-weight: 700;
    color: var(--primary-color);
}

.message-subject {
    font-weight: 600;
    color: #333;
    padding: 5px 0;
}

.message-date {
    font-size: 0.9rem;
    color: #777;
}

.message-view {
    flex: 2;
    /* Takes 2/3 width */
}

.message-view-header {
    padding: 30px;
    border-bottom: 1px solid #eee;
}

.message-view-header h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.message-view-header p {
    font-size: 1rem;
    color: #555;
    margin: 5px 0;
}

.message-view-body {
    padding: 30px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.message-view-body p {
    margin-bottom: 20px;
}

/* --- Styles for Teacher Messages Page --- */
.message-view-reply {
    padding: 30px;
    background: var(--light-gray);
    border-top: 1px solid #eee;
}

.message-view-reply textarea {
    width: 100%;
    height: 120px;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 15px;
}

.message-view-reply .cta-button {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    cursor: pointer;
}

/* --- Styles for Teacher Classes Page --- */
.class-manager-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    background: var(--white);
    border: 1px solid #ddd;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    overflow: hidden;
    min-height: 600px;
}

.class-list-menu {
    flex: 1;
    /* Takes 1/4 width */
    border-right: 1px solid #eee;
    background: #fdfdfd;
    padding: 20px;
}

.class-list-menu h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 20px;
}

.class-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.class-item:hover {
    background: #f4f4f4;
}

.class-item.active {
    background: var(--primary-color);
    color: var(--white);
}

.class-item i {
    font-size: 1.2rem;
}

.class-view-content {
    flex: 3;
    /* Takes 3/4 width */
    padding: 30px;
}

.class-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.class-view-header h2 {
    color: var(--primary-color);
    margin: 0;
}

.class-view-header .cta-button {
    background: var(--primary-color);
    color: var(--white);
    padding: 10px 15px;
}

.student-list-table {
    width: 100%;
    border-collapse: collapse;
}

.student-list-table th,
.student-list-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.student-list-table thead th {
    background: var(--light-gray);
    color: var(--primary-color);
}

.student-list-table .actions {
    display: flex;
    gap: 10px;
}

.btn-icon {
    padding: 8px 10px;
    background: var(--secondary-color);
    color: var(--primary-color);
    border-radius: 5px;
    font-size: 0.9rem;
}

.btn-icon:hover {
    background: #e9a802;
}

.btn-icon.btn-delete {
    background: #dc3545;
    color: var(--white);
}

.btn-icon.btn-delete:hover {
    background: #c82333;
}

/* --- Styles for Teacher Attendance Page --- */
.attendance-form-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.attendance-log-table {
    width: 100%;
    border-collapse: collapse;
}

.attendance-log-table th,
.attendance-log-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.attendance-log-table thead th {
    background: var(--light-gray);
    color: var(--primary-color);
}

.attendance-log-table td.radio-cell {
    text-align: center;
}

.attendance-log-table input[type="radio"] {
    transform: scale(1.4);
    /* Make radio buttons easier to click */
    cursor: pointer;
}

/* --- Style for Success Alert --- */
.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-weight: 600;
}

/* --- Styles for Teacher Grades Page --- */
.grades-form-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.grades-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
    background: var(--light-gray);
    border-radius: 8px;
    margin-bottom: 30px;
}

.grades-header .form-group {
    flex: 1;
    margin-bottom: 0;
}

.grades-header .form-group label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    display: block;
}

.grades-header .form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

.grades-entry-table {
    width: 100%;
    border-collapse: collapse;
}

.grades-entry-table th,
.grades-entry-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.grades-entry-table thead th {
    background: #fdfdfd;
    color: var(--primary-color);
}

.grade-input {
    width: 100px;
    padding: 8px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    text-align: center;
}

/* --- Styles for Admin CRUD Pages --- */
.admin-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.admin-form-container {
    flex: 1;
    /* Takes 1/3 of the space */
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.admin-form-container h3 {
    font-size: 1.6rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

.admin-form .form-group {
    margin-bottom: 20px;
}

.admin-form label {
    display: block;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.admin-form input[type="text"],
.admin-form input[type="password"],
.admin-form input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

.admin-form .cta-button {
    width: 100%;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    cursor: pointer;
}

.admin-table-container {
    flex: 2;
    /* Takes 2/3 of the space */
}

.admin-table-container h3 {
    font-size: 1.6rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table thead th {
    background: var(--light-gray);
    color: var(--primary-color);
}

/* --- Style for Alert Messages --- */
.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-weight: 600;
}

.admin-form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    background: #fff;
}

.admin-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    resize: vertical;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .facility-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .admission-steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }

    .admin-layout {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: var(--white);
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .cta-button {
        display: none;
        /* Hide header cta on small screens */
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .highlights .container {
        flex-direction: column;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .content-block-split {
        flex-direction: column;
    }

    .program-grid {
        grid-template-columns: 1fr;
    }

    .cta-banner {
        padding: 40px 25px;
    }

    .admission-steps {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
        /* Stack form fields */
    }

    .application-form {
        padding: 25px;
    }

    .facility-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .contact-layout {
        flex-direction: column;
    }

    .contact-form {
        grid-template-columns: 1fr;
    }

    .contact-form-container {
        padding: 25px;
    }

    .attendance-summary {
        flex-direction: column;
    }

    .message-container {
        flex-direction: column;
    }

    .message-list {
        border-right: none;
        border-bottom: 1px solid #ddd;
    }

    .class-manager-container {
        flex-direction: column;
    }

    .class-list-menu {
        border-right: none;
        border-bottom: 1px solid #ddd;
    }

    .grades-header {
        flex-direction: column;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Print Styles --- */
@media print {

    body,
    header,
    footer,
    .page-header {
        visibility: hidden;
    }

    .report-card-container,
    .challan-container {
        visibility: visible;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none;
        border: none;
        margin: 0;
    }

    .report-footer button,
    .challan-footer button {
        display: none;
    }
}

/* Add this to style.css for correct logo alignment */
.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-container .logo {
    /* Uses the existing .logo styling for color and size */
    margin: 0;
}

/* --- Custom Styles to Match Screenshot Design (Header Fixes) --- */

/* 1. Reset Header Styles for the "clean" look and set Z-index */
header.main-site-header {
    border-bottom: 2px solid var(--primary-color);
    box-shadow: none;
    /* The Z-index and position: sticky should already be defined, but ensuring the background is white stops bleed-through */
    background: var(--white);
    z-index: 1000;
    position: sticky;
    top: 0;
}

/* 2. Logo Wrapper: Essential for horizontal alignment */
.logo-wrapper {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: initial;
    font-weight: initial;
    /* FIX: Remove default link underline on wrapper */
    text-decoration: none;
}

/* 3. Style the Logo Image */
.header-logo-img {
    /* Set a manageable height for the logo image */
    height: 40px;
    margin-right: 10px;
}

/* 4. Style the Logo Text */
.logo-wrapper span {
    font-size: 1.5rem;
    font-weight: 700;
    /* Set the green color for the text, matching the result portal/logo */
    color: #006400;
    margin: 0;
}

/* 5. FIX: Ensure navigation wrapper aligns vertically */
header.main-site-header .container {
    height: var(--header-height);
    align-items: center;
}