/*
 * School Management System - Main Stylesheet
 * Responsive Design: Mobile First Approach
 * Author: M Designs
 * Version: 1.0
 */

/* =============================================
   CSS VARIABLES (Custom Properties)
   ============================================= */
:root {
    /* Primary Colors */
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #60a5fa;

    /* Secondary Colors */
    --secondary-color: #7c3aed;
    --secondary-dark: #5b21b6;
    --secondary-light: #a78bfa;

    /* Accent Colors */
    --accent-color: #f59e0b;
    --accent-dark: #d97706;
    --accent-light: #fbbf24;

    /* Neutral Colors */
    --white: #ffffff;
    --black: #000000;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Semantic Colors */
    --success-color: #10b981;
    --success-light: #d1fae5;
    --warning-color: #f59e0b;
    --warning-light: #fef3c7;
    --error-color: #ef4444;
    --error-light: #fee2e2;
    --info-color: #3b82f6;
    --info-light: #dbeafe;

    /* Typography */
    --font-primary: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-secondary: 'Roboto', Arial, sans-serif;
    --font-heading: 'Outfit', 'Inter', sans-serif;

    /* Font Sizes */
    --text-xs: 0.75rem;
    /* 12px */
    --text-sm: 0.875rem;
    /* 14px */
    --text-base: 1rem;
    /* 16px */
    --text-lg: 1.125rem;
    /* 18px */
    --text-xl: 1.25rem;
    /* 20px */
    --text-2xl: 1.5rem;
    /* 24px */
    --text-3xl: 1.875rem;
    /* 30px */
    --text-4xl: 2.25rem;
    /* 36px */
    --text-5xl: 3rem;
    /* 48px */

    /* Spacing */
    --space-1: 0.25rem;
    /* 4px */
    --space-2: 0.5rem;
    /* 8px */
    --space-3: 0.75rem;
    /* 12px */
    --space-4: 1rem;
    /* 16px */
    --space-5: 1.25rem;
    /* 20px */
    --space-6: 1.5rem;
    /* 24px */
    --space-8: 2rem;
    /* 32px */
    --space-10: 2.5rem;
    /* 40px */
    --space-12: 3rem;
    /* 48px */
    --space-16: 4rem;
    /* 64px */

    /* Border Radius */
    --radius-sm: 0.25rem;
    /* 4px */
    --radius-md: 0.375rem;
    /* 6px */
    --radius-lg: 0.5rem;
    /* 8px */
    --radius-xl: 0.75rem;
    /* 12px */
    --radius-2xl: 1rem;
    /* 16px */
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;

    /* Z-Index */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* =============================================
   RESET & BASE STYLES
   ============================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-50);
    overflow-x: hidden;
}

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-4);
    color: var(--gray-900);
}

h1 {
    font-size: var(--text-4xl);
}

h2 {
    font-size: var(--text-3xl);
}

h3 {
    font-size: var(--text-2xl);
}

h4 {
    font-size: var(--text-xl);
}

h5 {
    font-size: var(--text-lg);
}

h6 {
    font-size: var(--text-base);
}

p {
    margin-bottom: var(--space-4);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

strong,
b {
    font-weight: 600;
}

em,
i {
    font-style: italic;
}

/* =============================================
   LAYOUT CONTAINERS
   ============================================= */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--space-4);
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 calc(var(--space-4) * -0.5);
}

.col {
    flex: 1;
    padding: 0 calc(var(--space-4) * 0.5);
}

/* Column System */
.col-1 {
    flex: 0 0 8.333333%;
    max-width: 8.333333%;
}

.col-2 {
    flex: 0 0 16.666667%;
    max-width: 16.666667%;
}

.col-3 {
    flex: 0 0 25%;
    max-width: 25%;
}

.col-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

.col-5 {
    flex: 0 0 41.666667%;
    max-width: 41.666667%;
}

.col-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.col-7 {
    flex: 0 0 58.333333%;
    max-width: 58.333333%;
}

.col-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
}

.col-9 {
    flex: 0 0 75%;
    max-width: 75%;
}

.col-10 {
    flex: 0 0 83.333333%;
    max-width: 83.333333%;
}

.col-11 {
    flex: 0 0 91.666667%;
    max-width: 91.666667%;
}

.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

/* =============================================
   HEADER STYLES
   ============================================= */
.site-header {
   background: radial-gradient(circle,rgba(238, 174, 202, 1) 0%, rgba(148, 187, 233, 1) 100%);
    color: var(--white);
    padding: var(--space-6) 0;
    box-shadow: var(--shadow-md);
    position: relative;
}

.school-logo {
    max-width: 150px;
    height: auto;
    display: block;
    margin: 0 auto var(--space-4);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.school-info {
    text-align: center;
}

.school-name {
    font-size: var(--text-4xl);
    font-weight: 800;
    margin-bottom: var(--space-2);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.school-address,
.school-contact {
    font-size: var(--text-base);
    margin-bottom: var(--space-2);
    opacity: 0.95;
}

/* =============================================
   NAVIGATION
   ============================================= */
.main-nav {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--space-2);
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: var(--space-3) var(--space-5);
    color: var(--gray-700);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    transform: translateY(-2px);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: var(--text-2xl);
    color: var(--gray-700);
    cursor: pointer;
    padding: var(--space-2);
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    display: inline-block;
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-base);
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: var(--white);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--secondary-dark);
    color: var(--white);
}

.btn-success {
    background-color: var(--success-color);
    color: var(--white);
}

.btn-success:hover {
    background-color: #059669;
    color: var(--white);
}

.btn-warning {
    background-color: var(--warning-color);
    color: var(--white);
}

.btn-warning:hover {
    background-color: var(--warning-color);
    color: var(--white);
}

.btn-danger {
    background-color: var(--error-color);
    color: var(--white);
}

.btn-danger:hover {
    background-color: #dc2626;
    color: var(--white);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-lg);
}

.btn-block {
    display: block;
    width: 100%;
}

/* =============================================
   FORMS
   ============================================= */
.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 500;
    color: var(--gray-700);
}

.form-control {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    font-family: var(--font-primary);
    color: var(--gray-800);
    background-color: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control:disabled {
    background-color: var(--gray-100);
    cursor: not-allowed;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23374151' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-3) center;
    padding-right: var(--space-8);
}

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: var(--space-3);
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: var(--space-2);
    cursor: pointer;
}

.form-check-label {
    cursor: pointer;
    user-select: none;
}

.form-text {
    display: block;
    margin-top: var(--space-2);
    font-size: var(--text-sm);
    color: var(--gray-500);
}

.form-error {
    display: block;
    margin-top: var(--space-2);
    font-size: var(--text-sm);
    color: var(--error-color);
}

/* =============================================
   CARDS
   ============================================= */
.card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-header {
    padding: var(--space-5) var(--space-6);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    font-weight: 600;
    font-size: var(--text-lg);
}

.card-body {
    padding: var(--space-6);
}

.card-footer {
    padding: var(--space-4) var(--space-6);
    background-color: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

/* =============================================
   TABLES
   ============================================= */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.table th {
    padding: var(--space-4) var(--space-5);
    text-align: left;
    font-weight: 600;
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table td {
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--gray-200);
}

.table tbody tr:hover {
    background-color: var(--gray-50);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table-striped tbody tr:nth-child(even) {
    background-color: var(--gray-50);
}

/* =============================================
   ALERTS
   ============================================= */
.alert {
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-5);
    border-radius: var(--radius-md);
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.alert-success {
    background-color: var(--success-light);
    border-color: var(--success-color);
    color: #065f46;
}

.alert-warning {
    background-color: var(--warning-light);
    border-color: var(--warning-color);
    color: #92400e;
}

.alert-error {
    background-color: var(--error-light);
    border-color: var(--error-color);
    color: #991b1b;
}

.alert-info {
    background-color: var(--info-light);
    border-color: var(--info-color);
    color: #1e40af;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
    background-color: var(--gray-900);
    color: var(--gray-300);
    padding: var(--space-8) 0 var(--space-4);
    margin-top: var(--space-16);
}

.footer-content {
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--space-6);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}

.footer-link {
    color: var(--gray-300);
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--white);
    text-decoration: none;
}

.copyright {
    font-size: var(--text-sm);
    color: var(--gray-400);
}

/* =============================================
   UTILITY CLASSES
   ============================================= */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: var(--space-1);
}

.mt-2 {
    margin-top: var(--space-2);
}

.mt-3 {
    margin-top: var(--space-3);
}

.mt-4 {
    margin-top: var(--space-4);
}

.mt-5 {
    margin-top: var(--space-5);
}

.mt-6 {
    margin-top: var(--space-6);
}

.mb-1 {
    margin-bottom: var(--space-1);
}

.mb-2 {
    margin-bottom: var(--space-2);
}

.mb-3 {
    margin-bottom: var(--space-3);
}

.mb-4 {
    margin-bottom: var(--space-4);
}

.mb-5 {
    margin-bottom: var(--space-5);
}

.mb-6 {
    margin-bottom: var(--space-6);
}

.pt-1 {
    padding-top: var(--space-1);
}

.pt-2 {
    padding-top: var(--space-2);
}

.pt-3 {
    padding-top: var(--space-3);
}

.pt-4 {
    padding-top: var(--space-4);
}

.pt-5 {
    padding-top: var(--space-5);
}

.pt-6 {
    padding-top: var(--space-6);
}

.pb-1 {
    padding-bottom: var(--space-1);
}

.pb-2 {
    padding-bottom: var(--space-2);
}

.pb-3 {
    padding-bottom: var(--space-3);
}

.pb-4 {
    padding-bottom: var(--space-4);
}

.pb-5 {
    padding-bottom: var(--space-5);
}

.pb-6 {
    padding-bottom: var(--space-6);
}

.d-none {
    display: none;
}

.d-block {
    display: block;
}

.d-inline {
    display: inline;
}

.d-inline-block {
    display: inline-block;
}

.d-flex {
    display: flex;
}

.flex-row {
    flex-direction: row;
}

.flex-column {
    flex-direction: column;
}

.justify-start {
    justify-content: flex-start;
}

.justify-center {
    justify-content: center;
}

.justify-end {
    justify-content: flex-end;
}

.justify-between {
    justify-content: space-between;
}

.align-start {
    align-items: flex-start;
}

.align-center {
    align-items: center;
}

.align-end {
    align-items: flex-end;
}

.w-100 {
    width: 100%;
}

.h-100 {
    height: 100%;
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn var(--transition-base);
}

.slide-down {
    animation: slideDown var(--transition-base);
}

.slide-up {
    animation: slideUp var(--transition-base);
}

/* =============================================
   PRINT STYLES
   ============================================= */
@media print {
    .no-print {
        display: none !important;
    }

    .site-header,
    .main-nav,
    .site-footer {
        display: none;
    }

    body {
        background-color: white;
        color: black;
    }

    .card {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* =============================================
   FLASH NEWS TICKER
   ============================================= */
.flash-news-ticker {
    background-color: var(--gray-900);
    color: var(--white);
    padding: 0;
    font-size: var(--text-sm);
    border-bottom: 2px solid var(--accent-color);
}

.container-ticker {
    display: flex;
    align-items: stretch;
    height: 40px;
    padding: 0 !important;
}

.ticker-label {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
    color: var(--white);
    padding: 0 var(--space-4);
    display: flex;
    align-items: center;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    position: relative;
    z-index: 2;
}

.ticker-label::after {
    content: '';
    position: absolute;
    right: -15px;
    top: 0;
    border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;
    border-left: 15px solid var(--accent-dark);
}

.ticker-content {
    flex: 1;
    display: flex;
    align-items: center;
    padding-left: var(--space-8);
    overflow: hidden;
}

.ticker-content marquee {
    width: 100%;
    font-weight: 500;
}