/* ========================================
   NUIST Campus Website - Main Stylesheet
   ======================================== */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* ========================================
   Typography
   ======================================== */
h1 {
    font-size: 2.5em;
    color: #004080;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

h2 {
    font-size: 2em;
    color: #0055aa;
    border-bottom: 2px solid #007BFF;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

h3 {
    font-size: 1.5em;
    color: #003366;
    margin-bottom: 15px;
}

p {
    margin-bottom: 15px;
}

/* ========================================
   Navigation
   ======================================== */
.fixed-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #007BFF;
    padding: 15px 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

nav a {
    display: inline-block;
    margin: 0 15px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

nav a:hover {
    background-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

nav a.active {
    background-color: rgba(255,255,255,0.3);
}

/* ========================================
   Container and Layout
   ======================================== */
.container {
    max-width: 1200px;
    margin: 100px auto 40px;
    padding: 20px;
}

/* ========================================
   Cards
   ======================================== */
.card {
    background-color: #fff;
    padding: 25px;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

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

/* ========================================
   Tables
   ======================================== */
table {
    border-collapse: collapse;
    width: 100%;
    margin: 20px 0;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

th, td {
    border: 1px solid #ddd;
    padding: 12px 15px;
    text-align: left;
}

th {
    background-color: #007BFF;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #f0f8ff;
}

/* ========================================
   Lists
   ======================================== */
ul, ol {
    margin: 15px 0;
    padding-left: 30px;
}

li {
    margin: 8px 0;
}

/* ========================================
   Forms
   ======================================== */
form {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 20px auto;
}

label {
    display: block;
    font-weight: bold;
    color: #003366;
    margin-top: 15px;
    margin-bottom: 5px;
}

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    border-color: #007BFF;
    box-shadow: 0 0 5px rgba(0,123,255,0.3);
    outline: none;
}

input[type="submit"],
input[type="reset"],
button {
    padding: 12px 30px;
    margin: 20px 10px 10px 0;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

input[type="submit"]:hover,
input[type="reset"]:hover,
button:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

input[type="reset"] {
    background-color: #6c757d;
}

input[type="reset"]:hover {
    background-color: #5a6268;
}

/* ========================================
   Images and Media
   ======================================== */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.float-left {
    float: left;
    margin: 10px 20px 10px 0;
}

/* ========================================
   Footer
   ======================================== */
footer {
    background-color: #003366;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(-20px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

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

/* ========================================
   Utility Classes
   ======================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.p-20 { padding: 20px; }

.hidden { display: none; }
.invisible { visibility: hidden; }

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .fixed-nav {
        padding: 10px 0;
    }
    
    nav a {
        display: block;
        margin: 5px 0;
    }
    
    .container {
        margin-top: 180px;
        padding: 10px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    h2 {
        font-size: 1.5em;
    }
    
    form {
        padding: 20px;
    }
}
