/* ===================================================================
   CAMPUS INVENTORY MANAGEMENT SYSTEM - STYLESHEET
   REQ 6: External CSS to control text and link formatting
   All styling is managed through this external stylesheet
   =================================================================== */

/* ===================================================================
   1. RESET AND BASE STYLES
   =================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* ===================================================================
   2. NAVIGATION BAR - REQ 8: Intuitive and consistent navigation
   =================================================================== */
.navbar {
    background: linear-gradient(to right, #2c3e50, #34495e);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.nav-list {
    list-style: none;
    display: flex;
    justify-content: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.nav-list li {
    margin: 0;
}

.nav-list a {
    display: block;
    padding: 15px 20px;
    color: #ecf0f1;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.nav-list a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-bottom-color: #3498db;
}

.nav-list a.active {
    background-color: #3498db;
    border-bottom-color: #2980b9;
    color: #fff;
}

/* ===================================================================
   3. CONTAINER AND LAYOUT - REQ 5: Box model and positioning
   =================================================================== */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

h2 {
    color: #34495e;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.8rem;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

h3 {
    color: #2c3e50;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.page-description,
.intro-text {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 20px;
    font-style: italic;
}

p {
    margin-bottom: 15px;
}

a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* ===================================================================
   4. TEAM SECTION - REQ 1: Group members' information display
   =================================================================== */
.team-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    margin: 30px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.team-card {
    background: linear-gradient(to bottom, #ecf0f1, #bdc3c7);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.image-container {
    margin-bottom: 15px;
    /* REQ 5: Image container with box model and positioning */
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 8px;
}

/* ===================================================================
   5. IMAGES - REQ 4: Different image types and styling
   =================================================================== */

/* REQ 4: Rollover Image - Hover effect */
.team-photo,
.hover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease, filter 0.4s ease;
    /* REQ 5: Box model and positioning styling */
    display: block;
    border-radius: 8px;
}

.hover-image:hover {
    transform: scale(1.1);
    filter: brightness(0.9);
    cursor: pointer;
}

/* REQ 4: Hyperlinked Image */
.hyperlinked-image {
    max-width: 100%;
    height: auto;
    border: 3px solid #3498db;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: block;
    margin: 20px auto;
    /* REQ 5: Box model and positioning */
    padding: 10px;
    background-color: #ecf0f1;
}

.hyperlinked-image:hover {
    transform: scale(1.05);
    border-color: #2980b9;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.team-card p {
    margin: 8px 0;
}

/* ===================================================================
   6. TABLES - REQ 5: Two different table types
   =================================================================== */

/* REQ 5: Table with invisible borders (for layout purposes) */
.layout-table {
    width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
}

.layout-table td {
    border: none;
    /* Invisible borders achieved by using transparent borders */
    border: 1px solid transparent;
    padding: 15px;
    vertical-align: top;
}

.layout-table .info-label {
    background-color: #ecf0f1;
    font-weight: bold;
    width: 50%;
}

.layout-table .info-content {
    background-color: #fff;
}

/* REQ 5: Table with visible borders (for data display) */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.data-table thead {
    background-color: #2c3e50;
    color: white;
}

.data-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border: 1px solid #bdc3c7;
}

.data-table td {
    padding: 12px;
    border: 1px solid #bdc3c7;
}

.data-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.data-table tbody tr:hover {
    background-color: #e8f4f8;
    transition: background-color 0.2s ease;
}

.inventory-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ===================================================================
   7. FORMS - REQ 7: Form elements (text fields, radio, checkboxes)
   =================================================================== */

.inventory-form,
.contact-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

fieldset {
    border: 2px solid #3498db;
    border-radius: 5px;
    padding: 20px;
    margin: 20px 0;
    background-color: #f8f9fa;
}

legend {
    color: #2c3e50;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 0 10px;
}

/* REQ 7: Text Fields styling */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

input[type="text"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* REQ 7: Radio Buttons styling */
input[type="radio"],
input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: #3498db;
}

input[type="radio"] + label,
input[type="checkbox"] + label {
    display: inline;
    margin-right: 20px;
    cursor: pointer;
    font-weight: normal;
}

/* Radio and checkbox group styling */
fieldset .form-group div {
    margin-bottom: 10px;
}

input[type="radio"] + label:hover,
input[type="checkbox"] + label:hover {
    color: #3498db;
}

/* ===================================================================
   8. BUTTONS - REQ 6: Button styling with CSS
   =================================================================== */

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
}

button,
.btn-primary,
.btn-secondary,
.btn-cancel {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary,
button[type="submit"] {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover,
button[type="submit"]:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(52, 152, 219, 0.4);
}

.btn-secondary,
button[type="reset"] {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover,
button[type="reset"]:hover {
    background-color: #7f8c8d;
    transform: translateY(-2px);
}

.btn-cancel {
    background-color: #e74c3c;
    color: white;
}

.btn-cancel:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

/* ===================================================================
   9. FEATURES AND LINKS SECTION
   =================================================================== */

.features-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    margin: 30px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    padding: 10px 0;
    border-bottom: 1px solid #ecf0f1;
}

.features-list li:last-child {
    border-bottom: none;
}

.features-list a {
    display: inline-block;
    padding: 8px 15px;
    background-color: #3498db;
    color: white;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.features-list a:hover {
    background-color: #2980b9;
    text-decoration: none;
}

/* ===================================================================
   10. SECTIONS AND CONTENT AREAS
   =================================================================== */

.banner-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    margin: 30px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.info-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    margin: 30px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.action-section {
    background: linear-gradient(to right, #3498db, #2980b9);
    color: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    margin: 30px 0;
}

.action-section a {
    color: white;
    font-weight: 600;
}

.contact-info {
    background: white;
    padding: 30px;
    border-radius: 8px;
    margin: 30px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.contact-form-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    margin: 30px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.support-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    margin: 30px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.resource-links {
    margin-top: 15px;
}

/* ===================================================================
   11. FOOTER - REQ 8: Consistent footer across all pages
   =================================================================== */

.footer {
    background: #2c3e50;
    color: #ecf0f1;
    text-align: center;
    padding: 30px 20px;
    margin-top: 50px;
    border-top: 4px solid #3498db;
}

.footer p {
    margin: 5px 0;
}

.footer small {
    color: #95a5a6;
    font-size: 0.9rem;
}

/* ===================================================================
   12. RESPONSIVE DESIGN
   =================================================================== */

@media (max-width: 768px) {
    .team-grid {
        grid-template-columns: 1fr;
    }

    .nav-list {
        flex-direction: column;
    }

    .nav-list a {
        padding: 12px 15px;
        border-bottom: none;
        border-left: 3px solid transparent;
    }

    .nav-list a:hover {
        border-left-color: #3498db;
        border-bottom-color: transparent;
    }

    .nav-list a.active {
        border-left-color: #3498db;
        border-bottom-color: transparent;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    .table {
        font-size: 0.9rem;
    }

    .data-table th,
    .data-table td {
        padding: 8px;
    }

    .form-actions {
        flex-direction: column;
    }

    button,
    .btn-primary,
    .btn-secondary,
    .btn-cancel {
        width: 100%;
    }

    .layout-table {
        display: block;
    }

    .layout-table td {
        display: block;
        width: 100%;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    h1 {
        font-size: 1.5rem;
    }

    input[type="text"],
    input[type="email"],
    textarea,
    select {
        font-size: 16px;
        /* Prevents zoom on iOS */
    }
}

/* ===================================================================
   13. UTILITY CLASSES
   =================================================================== */

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.margin-top {
    margin-top: 20px;
}

.margin-bottom {
    margin-bottom: 20px;
}

.padding {
    padding: 20px;
}

/* ===================================================================
   REQUIREMENTS SUMMARY
   =================================================================== */
/*
   REQ 1: ✓ Homepage with group members' information (team-section)
   REQ 2: ✓ All pages properly titled (HTML title tags)
   REQ 3: ✓ Links included:
           - Absolute Links (.nav-list a[href*='example'], etc)
           - Relative Links (index.html, inventory.html, etc)
   REQ 4: ✓ Image types included:
           - Rollover Image (.hover-image:hover)
           - Hyperlinked Image (.hyperlinked-image)
   REQ 5: ✓ Box model and positioning display
           - Image styling (.image-container, .team-photo)
           - Tables (.data-table, .layout-table with borders)
   REQ 6: ✓ External CSS stylesheet controlling all text and formats
   REQ 7: ✓ Form with elements:
           - Text Fields (input[type="text"], textarea)
           - Radio Buttons (input[type="radio"])
           - Checkboxes (input[type="checkbox"])
   REQ 8: ✓ Navigation consistent throughout (.navbar, persistent structure)
   REQ 9: ✓ Site ready for demonstration (clean, functional styling)
   REQ 10: Will be handled after FTP upload to hosting service
*/
