/* Fonts */
/* Primary Font: Sans-Serif for Body */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap');
/* Secondary Font: Serif for Logo */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700&display=swap');
/* Title Font: Condensed Sans for Headers like "OUR SCHOOL" */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@700&display=swap');

:root {
    /* Meridian Elementary: Red & Black */
    --primary-color: #C8102E;
    /* Meridian Red */
    --primary-hover: #A00C23;
    /* Darker Red */
    --secondary-color: #000000;
    /* Black */
    --text-color: #333333;
    /* Dark Gray */
    --text-muted: #666666;
    --bg-color: #ffffff;
    /* Pure White */
    --card-bg: #ffffff;
    --border-radius: 4px;
    /* Flatter look */
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Open Sans', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    /* Remove center alignment to allow full-width headers */
    align-items: stretch;
    padding: 0;
}

/* Container limits width only for main content area */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    box-sizing: border-box;
    flex: 1;
    /* Push footer down */
}

/* Redefine glass-card to be a flat, clean card */
.glass-card {
    background: var(--card-bg);
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

h1,
h2,
h3,
h4,
h5 {
    color: var(--secondary-color);
    font-weight: 700;
    margin-top: 0;
}

h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    text-transform: uppercase;
    font-family: 'Roboto Condensed', sans-serif;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: 2px;
    /* Sharp corners like screenshot */
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f8f9fa;
    color: var(--text-color);
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #e2e6ea;
}

.btn-danger {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-danger:hover {
    background: var(--primary-color);
    color: white;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
    text-transform: uppercase;
}

input[type="email"],
input[type="text"],
input[type="password"],
input[type="file"],
select {
    width: 100%;
    padding: 0.75rem;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 1rem;
    box-sizing: border-box;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
}


/* Alert Styles */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    font-size: 0.95rem;
}

.alert-error {
    background-color: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border-color: #a7f3d0;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border-color: #bfdbfe;
}

/* Site Header */
.site-header {
    background: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.school-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.school-logo img {
    height: 60px;
}

.school-logo-text {
    display: flex;
    flex-direction: column;
}

.school-logo-text .main {
    font-family: 'Merriweather', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: black;
    line-height: 1;
}

.school-logo-text .sub {
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    color: #555;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: black;
    font-weight: 700;
    text-transform: uppercase;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 1.1rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a.active {
    color: var(--primary-color);
}

/* Site Footer */
.site-footer {
    background: var(--primary-color);
    color: white;
    padding: 4rem 2rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.footer-info h3 {
    color: white;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-info p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
    opacity: 0.9;
}

.footer-social h4 {
    color: white;
    text-align: right;
    font-family: 'Merriweather', serif;
    font-style: italic;
    font-weight: 400;
    font-size: 1.5rem;
}

/* Helper Components */
.hero-section {
    width: 100%;
    height: 400px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0;
    /* Connected look */
    max-width: 1200px;
    margin: -3rem auto 3rem;
    /* Overlap hero */
    z-index: 10;
    position: relative;
    background: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.icon-item {
    text-align: center;
    padding: 2rem 1rem;
    border-right: 1px solid #eee;
    transition: background 0.2s;
    text-decoration: none;
    color: black;
}

.icon-item:last-child {
    border-right: none;
}

.icon-item:hover {
    background: #f9f9f9;
}

.icon-item svg {
    width: 40px;
    height: 40px;
    margin-bottom: 1rem;
    color: #333;
}

.icon-item span {
    display: block;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: var(--primary-color);
}

/* Modal System (Preserved) */
/* Custom Modal System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal-container {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    transform: scale(0.95);
    transition: transform 0.2s ease-in-out;
    text-align: center;
}

.modal-overlay.show .modal-container {
    transform: scale(1);
}

.modal-header {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--primary-color);
    /* Updated for visibility on white */
}

.modal-body {
    margin-bottom: 2rem;
    color: var(--text-color);
    line-height: 1.5;
    white-space: pre-wrap;
}

.modal-footer {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.modal-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-family: inherit;
    text-transform: uppercase;
}

.modal-btn-confirm {
    background: var(--primary-color);
    color: white;
}

.modal-btn-confirm:hover {
    background: var(--primary-hover);
}

.modal-btn-cancel {
    background: #e5e7eb;
    color: var(--text-color);
}

.modal-btn-cancel:hover {
    background: #d1d5db;
}

/* Table overrides */
td,
th {
    border-bottom: 1px solid #ddd;
}

th {
    background: #f8f9fa;
    color: #333;
}

tr:hover td {
    background: #f9f9f9;
}