/* ==========================================================================
   1. VARIABLES & RESET
   ========================================================================== */
:root {
    --primary-color: #0056b3; 
    --primary-hover: #004494;
    --text-color: #333333;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --border-color: #e0e0e0;
    --success-bg: #d4edda;
    --success-text: #155724;
    --font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.6;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1;
}

/* Typography */
h1, h2, h3, h4 { margin-bottom: 15px; line-height: 1.2; color: #222; }
p { margin-bottom: 15px; }
.text-center { text-align: center; }
.bg-light { background-color: var(--bg-light); }

/* ==========================================================================
   2. HEADER & NAVIGATION
   ========================================================================== */
header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    position: relative;
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -0.5px;
}
.logo span { color: #333; }

nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
    align-items: center;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s ease;
}

nav ul li a:hover, 
nav ul li a.active {
    color: var(--primary-color);
}

/* ==========================================================================
   3. BUTTONS
   ========================================================================== */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 10px 24px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    border: 2px solid var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}
.btn:hover { background-color: var(--primary-hover); border-color: var(--primary-hover); color: #ffffff; }
.btn-large { padding: 15px 35px; font-size: 1.1rem; }
.btn-outline { background-color: transparent; color: var(--primary-color); }
.btn-outline:hover { background-color: var(--primary-color); color: #ffffff; }
.btn-outline-light { border-color: #ffffff; color: #ffffff; background-color: transparent; }
.btn-outline-light:hover { background-color: #ffffff; color: var(--primary-color); }

/* ==========================================================================
   4. LAYOUT & GRIDS
   ========================================================================== */
section { max-width: 1200px; margin: 0 auto; padding: 60px 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 86, 179, 0.85), rgba(0, 86, 179, 0.95)), url('../images/hero-bg.jpg') center/cover;
    color: #ffffff;
    text-align: center;
    padding: 100px 20px;
    max-width: 100%;
}
.hero h1 { font-size: 3.5rem; color: #ffffff; margin-bottom: 20px; }
.hero p { font-size: 1.3rem; max-width: 600px; margin: 0 auto 40px auto; }
.hero-actions { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }

/* Cards */
.card {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }

/* ==========================================================================
   5. FORMS
   ========================================================================== */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: #444; }
input[type="text"], input[type="email"], input[type="number"], input[type="date"], select, textarea {
    width: 100%; padding: 14px; border: 1px solid #ccc; border-radius: 6px; font-family: var(--font-family); font-size: 1rem; transition: border-color 0.3s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1); }

.inventory-row { display: flex; gap: 10px; align-items: center; margin-bottom: 15px; flex-wrap: wrap; background: #fff; padding: 15px; border-radius: 6px; border: 1px solid #ddd; }
.remove-row { background: #dc3545; color: white; border: none; border-radius: 4px; padding: 10px 15px; cursor: pointer; font-weight: bold; }

/* ==========================================================================
   6. FOOTER
   ========================================================================== */
footer { background-color: #1a1a1a; color: #ffffff; padding: 60px 20px 20px; }
.footer-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.footer-col h3 { color: #ffffff; margin-bottom: 20px; font-size: 1.3rem; }
.footer-col p, .footer-col a { color: #bbbbbb; text-decoration: none; margin-bottom: 10px; display: block; }
.footer-col a:hover { color: #ffffff; }
.footer-col ul { list-style: none; }
.footer-copyright { border-top: 1px solid #333; padding-top: 20px; margin-top: 40px; text-align: center; color: #888; font-size: 0.9rem; }

/* ==========================================================================
   7. MOBILE RESPONSIVENESS
   ========================================================================== */
@media (max-width: 900px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-3, .grid-2, .footer-container { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.5rem; }
    .mobile-menu-toggle { display: block !important; }
    
    #main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        padding: 20px;
        z-index: 999;
    }
    
    #main-nav ul { flex-direction: column; align-items: flex-start; gap: 15px; }
    #main-nav ul li { width: 100%; }
    #main-nav .btn { display: block; text-align: center; width: 100%; }
    .inventory-row > div { flex: 1 1 100%; }
}