/* 
 * Student Result Management System - Style Sheet
 * A professional CSS for index.html, student.html, and teacher.html
 */

/* ===== GLOBAL STYLES ===== */
:root {
    --primary-color: #007bff;
    --primary-dark: #0056b3;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --body-bg: #f5f7fa;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
}

html {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--body-bg);
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 56px; /* For fixed navbar */
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

/* Buttons */
.btn {
    border-radius: 0.375rem;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
}

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

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

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

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

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

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.2);
}

/* Cards */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    margin-bottom: 1.5rem;
}

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

.card-header {
    border-bottom: none;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem 0.5rem 0 0 !important;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* ===== NAVIGATION ===== */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
}

.navbar-brand i {
    margin-right: 0.5rem;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color var(--transition-speed) ease;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: #fff;
}

.navbar-dark .navbar-nav .nav-link.active {
    position: relative;
}

.navbar-dark .navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 3px;
    background-color: #fff;
    border-radius: 3px 3px 0 0;
}

/* ===== HERO SECTION ===== */
.hero-section {
    padding: 2rem 0;
    min-height: calc(100vh - 56px);
    display: flex;
    align-items: center;
}

.animate-fade-in {
    animation: fadeIn 1s ease-in-out;
}

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

.features-list {
    margin: 2rem 0;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.feature-item i {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.hero-image-wrapper {
    position: relative;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-illustration {
    position: relative;
    width: 300px;
    height: 300px;
    background-color: rgba(0, 123, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: pulse 3s infinite alternate;
}

@keyframes pulse {
    from { transform: scale(1); box-shadow: 0 0 20px rgba(0, 123, 255, 0.2); }
    to { transform: scale(1.05); box-shadow: 0 0 30px rgba(0, 123, 255, 0.4); }
}

.main-illustration {
    font-size: 6rem;
    color: var(--primary-color);
}

.floating-card {
    position: absolute;
    width: 60px;
    height: 60px;
    background-color: white;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.card-1 {
    top: 20px;
    left: 20px;
    animation: float 4s infinite alternate;
}

.card-2 {
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    animation: float 5s 1s infinite alternate;
}

.card-3 {
    bottom: 20px;
    left: 80px;
    animation: float 4.5s 0.5s infinite alternate;
}

@keyframes float {
    from { transform: translateY(0); }
    to { transform: translateY(-15px); }
}

/* ===== STUDENT PORTAL ===== */
.student-info {
    background-color: rgba(0, 123, 255, 0.05);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.result-table th {
    background-color: rgba(0, 123, 255, 0.1);
}

.grade-A {
    color: #28a745;
    font-weight: 600;
}

.grade-B {
    color: #17a2b8;
    font-weight: 600;
}

.grade-C {
    color: #6c757d;
    font-weight: 600;
}

.grade-F {
    color: #dc3545;
    font-weight: 600;
}

/* ===== TEACHER PORTAL ===== */
.nav-tabs .nav-link {
    color: var(--secondary-color);
    border: none;
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    border-radius: 0.25rem 0.25rem 0 0;
    transition: all var(--transition-speed) ease;
}

.nav-tabs .nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(0, 123, 255, 0.05);
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    background-color: white;
    border-bottom: 3px solid var(--primary-color);
}

.nav-tabs .nav-link i {
    margin-right: 0.5rem;
}

.statistics-card {
    text-align: center;
    padding: 1.5rem;
}

.statistics-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.statistics-card h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 991.98px) {
    .hero-section {
        text-align: center;
        padding: 3rem 0;
    }
    
    .hero-image-wrapper {
        margin-top: 3rem;
    }
    
    .feature-item {
        justify-content: center;
    }
}

@media (max-width: 767.98px) {
    .card-header {
        padding: 1rem;
    }
    
    .card-body {
        padding: 1.25rem;
    }
    
    .btn {
        padding: 0.375rem 1rem;
    }
    
    .hero-illustration {
        width: 250px;
        height: 250px;
    }
    
    .main-illustration {
        font-size: 5rem;
    }
    
    .floating-card {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

@media (max-width: 575.98px) {
    h1.display-4 {
        font-size: 2.5rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .hero-illustration {
        width: 200px;
        height: 200px;
    }
    
    .main-illustration {
        font-size: 4rem;
    }
    
    .floating-card {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .nav-tabs .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .nav-tabs .nav-link i {
        margin-right: 0.25rem;
    }
}

/* ===== ANIMATIONS ===== */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.slide-in-right {
    animation: slideInRight 0.5s ease-in-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ===== KEY FEATURES SECTION ===== */
.key-features-section {
    padding: 4rem 0;
    background-color: var(--light-color);
}

.key-feature-card {
    height: 100%;
    text-align: center;
    padding: 2rem;
    transition: all var(--transition-speed) ease;
    border-radius: 0.5rem;
    background-color: white;
}

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

.key-feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: inline-block;
    padding: 1.5rem;
    border-radius: 50%;
    background-color: rgba(0, 123, 255, 0.1);
}

.key-feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.key-feature-description {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

/* ===== FOOTER ===== */
.footer {
    background-color: var(--dark-color);
    color: rgba(255, 255, 255, 0.8);
    padding: 2rem 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

.footer-links a:hover {
    color: white;
}

.main-content {
    flex: 1 0 auto;
}

/* ===== PRINT STYLES ===== */
@media print {
    body {
        padding-top: 0;
        background-color: white;
    }
    
    .navbar, .btn, .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .card-header {
        background-color: #f8f9fa !important;
        color: #333 !important;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
    }
}