/* ============================================
   Manyoni High School - Main Stylesheet
   ============================================ */

/* Global Styles */
:root {
    --primary-color: #198754;
    --secondary-color: #146c43;
    --accent-color: #ffc107;
    --dark-color: #212529;
    --light-color: #f8f9fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #fff;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: #212529;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Top Bar */
.top-bar {
    font-size: 0.9rem;
}

.top-bar a {
    color: #fff;
    transition: opacity 0.3s;
}

.top-bar a:hover {
    opacity: 0.8;
}

/* Navigation */
.navbar {
    border-bottom: 3px solid var(--primary-color);
}

.navbar-brand img {
    max-height: 60px;
    width: auto;
}

.school-name {
    font-size: 1.2rem;
    letter-spacing: 0.5px;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    color: #333 !important;
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

.navbar-nav .nav-link:hover::after {
    width: 60%;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
}

.hero-section h1 {
    font-size: 3rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-section .lead {
    font-size: 1.25rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-bottom: 4px solid var(--accent-color);
}

.page-header h1 {
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.breadcrumb-item a {
    color: #fff;
}

.breadcrumb-item.active {
    color: #e0e0e0;
}

/* Stats Section */
.stats-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.stats-section h3 {
    color: #fff;
    font-size: 2rem;
}

.stats-section p {
    color: #e0e0e0;
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
}

/* Buttons */
.btn {
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-success {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-success:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(25,135,84,0.3);
}

.btn-outline-success {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-success:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Tables */
.table th {
    background-color: var(--primary-color);
    color: #fff;
    font-weight: 500;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(25,135,84,0.05);
}

/* Forms */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(25,135,84,0.25);
}

.form-label {
    font-weight: 500;
}

/* Alerts */
.alert {
    border-radius: 10px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Gallery */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
}

.gallery-item img {
    transition: transform 0.3s;
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 10px;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.gallery-item:hover .overlay {
    transform: translateY(0);
}

/* Chat Messages */
.message {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#chat-messages {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
}

#chat-messages .message .rounded {
    border-radius: 15px !important;
    word-wrap: break-word;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

footer h5 {
    color: #fff;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

footer a {
    transition: color 0.3s;
}

footer a:hover {
    color: #fff !important;
}

/* Dashboard Cards */
.dashboard-card {
    transition: all 0.3s;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.dashboard-card i {
    transition: transform 0.3s;
}

.dashboard-card:hover i {
    transform: scale(1.2);
}

/* Badges */
.badge {
    padding: 0.5em 1em;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .school-name {
        font-size: 1rem;
    }
    
    .navbar-brand img {
        max-height: 45px;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .top-bar,
    footer,
    .btn,
    form {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
    }
    
    .container {
        width: 100%;
        padding: 0;
    }
}

/* Login/Register Pages */
.auth-card {
    max-width: 500px;
    margin: 0 auto;
}

.auth-card .card-body {
    padding: 2.5rem;
}

/* Admin Panel */
.admin-sidebar {
    min-height: 100vh;
    background: linear-gradient(180deg, #198754 0%, #146c43 100%);
}

.admin-sidebar .nav-link {
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 5px;
    margin-bottom: 0.25rem;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background-color: rgba(255,255,255,0.2);
    color: #fff;
}

/* Marks Entry */
.marks-input {
    width: 80px;
    text-align: center;
}

/* Progress Bar */
.progress-thin {
    height: 8px;
    border-radius: 4px;
}

/* Utility Classes */
.text-success {
    color: var(--primary-color) !important;
}

.bg-success {
    background-color: var(--primary-color) !important;
}

.shadow-sm {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
}

.rounded-lg {
    border-radius: 15px;
}