/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: #ffffff;
    color: #333;
    padding: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-bottom: 4px solid #de4528;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    height: 100px;
    width: auto;
}

.header-text {
    flex: 1;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.3rem;
    font-weight: 600;
    color: #000000;
}

header .subtitle {
    font-size: 1.1rem;
    color: #666;
}

/* Logout Button */
.logout-btn {
    background-color: #de4528;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.logout-btn:hover {
    background-color: #c43d23;
}

/* Navigation */
.main-nav {
    background-color: #000000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.main-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

.main-nav li {
    margin: 0;
}

.main-nav a {
    display: block;
    color: #ffffff;
    text-decoration: none;
    padding: 1rem 1.5rem;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.main-nav a:hover {
    background-color: #2a2a2a;
    border-bottom-color: #de4528;
}

.main-nav a.active {
    background-color: #de4528;
    border-bottom-color: #de4528;
}

/* Main Content */
main {
    padding: 2rem 20px;
    min-height: calc(100vh - 350px);
}

section {
    background: #ffffff;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid #de4528;
}

h2 {
    color: #de4528;
    margin-bottom: 1rem;
    font-size: 2rem;
    font-weight: 600;
}

h3 {
    color: #000000;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    margin-top: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #de4528;
}

h4 {
    color: #000000;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
    color: #333;
}

a {
    color: #de4528;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.card {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    display: block;
}

.card:hover {
    border-color: #de4528;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(222, 69, 40, 0.2);
    background: #fff;
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.card h4 {
    margin-bottom: 0.5rem;
    color: #de4528;
}

.card p {
    color: #666;
    font-size: 0.95rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: #ffffff;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

th {
    background-color: #de4528;
    color: white;
    font-weight: 600;
}

tr:hover {
    background-color: #f9f9f9;
}

td {
    color: #333;
}

/* Lists */
ol, ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
    color: #333;
}

li strong {
    color: #de4528;
}

/* Special Boxes */
.offline-notice, .info-box, .warning-box {
    padding: 1.5rem;
    border-radius: 6px;
    margin: 1.5rem 0;
    border-left: 4px solid;
}

.offline-notice {
    background-color: #fff8e1;
    border-left-color: #f59e0b;
}

.offline-notice p, .offline-notice strong {
    color: #92400e;
}

.info-box {
    background-color: #e3f2fd;
    border-left-color: #2196f3;
}

.info-box strong {
    color: #1565c0;
}

.warning-box {
    background-color: #ffebee;
    border-left-color: #de4528;
}

.warning-box strong {
    color: #de4528;
}

/* PDF Link Box */
.pdf-link-box {
    background-color: #f5f5f5;
    border: 2px solid #de4528;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center;
}

.pdf-link-box a {
    display: inline-block;
    background-color: #de4528;
    color: white;
    padding: 1rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
}

.pdf-link-box a:hover {
    background-color: #c13d22;
    text-decoration: none;
}

/* Welcome Section */
.welcome {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
}

.welcome h2 {
    font-size: 2.5rem;
}

/* Quick Links Section */
.quick-links h3 {
    text-align: center;
    margin-bottom: 2rem;
}

/* Search Box */
.search-box {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid #de4528;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

#search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    outline: none;
    transition: border-color 0.3s ease;
}

#search-input:focus {
    border-color: #de4528;
}

#search-button {
    background-color: #de4528;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

#search-button:hover {
    background-color: #c43d23;
}

/* Search Result Card */
.search-result-card {
    background: #ffffff;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid #de4528;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-result-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(222, 69, 40, 0.2);
}

.search-result-card h3 {
    margin-top: 0;
    border-bottom: none;
    padding-bottom: 0;
    display: flex;
    align-items: center;
}

.search-result-card h3 a {
    color: #de4528;
    text-decoration: none;
    font-size: 1.5rem;
}

.search-result-card h3 a:hover {
    text-decoration: underline;
}

.search-result-card ul {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

.search-result-card li {
    font-size: 0.95rem;
    color: #666;
}

/* Footer */
footer {
    background-color: #000000;
    color: #bfbfbf;
    padding: 1.5rem 0;
    text-align: center;
    margin-top: 3rem;
    border-top: 4px solid #de4528;
}

/* Hamburger Menu Toggle */
.nav-toggle {
    display: none;
    background: #de4528;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.nav-toggle:hover {
    background: #c43d23;
}

.nav-toggle span {
    float: right;
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .logo {
        height: 70px;
    }

    header h1 {
        font-size: 1.8rem;
    }

    header .subtitle {
        font-size: 0.95rem;
    }

    .nav-toggle {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        display: none;
    }

    .main-nav ul.nav-open {
        display: flex;
    }

    .main-nav a {
        border-bottom: 1px solid #333;
        border-left: 4px solid transparent;
    }

    .main-nav a:hover,
    .main-nav a.active {
        border-left-color: #de4528;
        border-bottom-color: #333;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    section {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .logo {
        height: 60px;
    }

    header h1 {
        font-size: 1.5rem;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }

    header {
        background: white;
        color: black;
        border-bottom: 2px solid black;
    }

    .main-nav, footer, .offline-notice, .pdf-link-box {
        display: none;
    }

    section {
        background: white;
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }

    h2, h3, h4 {
        color: black;
    }

    p, li, td {
        color: black;
    }

    th {
        background-color: #ccc;
        color: black;
    }

    a {
        color: black;
        text-decoration: underline;
    }
}
