/* Main CSS file for Student Management System */

/* Global Styles */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

ul {
    list-style: none;
}

h1, h2, h3, h4 {
    margin-bottom: 15px;
    line-height: 1.3;
}

img {
    max-width: 100%;
}

/* Header */
header {
    background-color: white;
    box-shadow: var(--box-shadow);
    padding: 20px 0;
    margin-bottom: 30px;
    border-radius: 0 0 10px 10px;
}

header h1 {
    margin: 0;
    color: var(--dark-color);
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

header nav ul {
    display: flex;
}

header nav ul li {
    margin-right: 20px;
}

header nav ul li:last-child {
    margin-right: 0;
}

header nav ul li a {
    color: var(--dark-color);
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 5px;
    transition: var(--transition);
}

header nav ul li a:hover {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--primary-color);
}

header nav ul li a.active {
    background-color: var(--primary-color);
    color: white;
}

/* Hero Section */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    padding: 30px;
    background-color: white;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
}

.hero-content {
    flex: 1;
    padding-right: 30px;
}

.hero-content h2 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: #555;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 20px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    margin-right: 10px;
}

.btn:last-child {
    margin-right: 0;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #27ae60;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.cta-buttons {
    display: flex;
    margin-top: 20px;
}

.cta-buttons .btn {
    display: flex;
    align-items: center;
}

.cta-buttons .btn i {
    margin-right: 8px;
}

/* Features Section */
.features {
    margin-bottom: 50px;
}

.features h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--dark-color);
}

.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.feature-card {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.feature-card p {
    color: #666;
}

/* Forms */
.form-container {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

.form-title {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--dark-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
}

.checkbox-item input {
    margin-right: 8px;
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.radio-item {
    display: flex;
    align-items: center;
}

.radio-item input {
    margin-right: 8px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 30px;
}

/* Tables */
.table-container {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: var(--dark-color);
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

.table .actions {
    display: flex;
    gap: 10px;
}

.table .btn {
    padding: 8px 12px;
    font-size: 0.9rem;
}

/* Student Search */
.search-container {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-box input {
    flex: 1;
}

/* Student Info Card */
.student-info {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

.student-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.student-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.detail-item {
    margin-bottom: 15px;
}

.detail-item label {
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
    color: #666;
}

.detail-item span {
    font-size: 1.1rem;
}

.courses-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.course-badge {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--primary-color);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Tabs */
.tabs {
    margin-bottom: 30px;
}

.tab-list {
    display: flex;
    background-color: #f8f9fa;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 20px;
}

.tab-item {
    padding: 15px 20px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.tab-item.active {
    background-color: var(--primary-color);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Alert Messages */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    position: relative;
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.1);
    border-left: 4px solid var(--secondary-color);
    color: #27ae60;
}

.alert-danger {
    background-color: rgba(231, 76, 60, 0.1);
    border-left: 4px solid var(--danger-color);
    color: #c0392b;
}

.alert-warning {
    background-color: rgba(243, 156, 18, 0.1);
    border-left: 4px solid var(--warning-color);
    color: #d35400;
}

.alert-info {
    background-color: rgba(52, 152, 219, 0.1);
    border-left: 4px solid var(--primary-color);
    color: #2980b9;
}

.close-alert {
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.pagination a {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 5px;
    border-radius: 5px;
    background-color: white;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.pagination a:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

.pagination a.active {
    background-color: var(--primary-color);
    color: white;
}

/* Admin Dashboard */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    text-align: center;
}

.stat-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.stat-card h3 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.stat-card p {
    color: #666;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background-color: white;
    padding: 20px 0;
    text-align: center;
    box-shadow: var(--box-shadow);
    border-radius: 10px 10px 0 0;
    margin-top: 50px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
    }

    .hero-content {
        padding-right: 0;
        margin-bottom: 30px;
    }

    header nav {
        flex-direction: column;
    }

    header nav ul {
        margin-top: 15px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
        margin-bottom: 10px;
        margin-right: 0;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-buttons .btn {
        width: 100%;
        margin-bottom: 10px;
        margin-right: 0;
    }
}