/* Navigation Menu Styles */
.container {
    position: relative;
}

.navigation-menu {
    display: flex; /* Temporarily always show for testing */
    gap: 20px;
    align-items: center;
    background-color: #f8f9fa; /* Light background */
    padding: 10px 20px;
    border-bottom: 1px solid #ddd;
}

.navigation-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.navigation-menu a:hover {
    background-color: var(--brand-orange, #ff6600); /* Use brand orange on hover */
    color: #fff;
}

.navigation-menu a:active {
    background-color: #e55a00; /* Darker orange on click */
}

.hamburger {
    display: block; /* Temporarily always show for testing */
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
    user-select: none; /* Prevent text selection */
    background-color: #ff0000; /* Make it red for visibility */
}

.hamburger:hover {
    background-color: #f0f0f0;
}

.hamburger:active {
    background-color: #e0e0e0;
    transform: scale(0.95);
}

/* Mobile Styles */
@media (max-width: 600px) {
    .navigation-menu {
        display: none !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        background: white !important;
        flex-direction: column !important;
        gap: 0 !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
        border-radius: 5px !important;
        z-index: 1000 !important;
        padding: 0 !important;
        border-bottom: none !important;
    }

    .navigation-menu.active {
        display: flex !important;
    }

    .navigation-menu a {
        padding: 15px 20px !important;
        border-bottom: 1px solid #eee !important;
        width: 100% !important;
        text-align: left !important;
    }

    .navigation-menu a:last-child {
        border-bottom: none !important;
    }

    .hamburger {
        display: block !important;
    }
}

/* ===== MENU STYLES ===== */
.menu-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
    margin-top: 20px;
}

.menu-item {
    padding: 10px 16px;
    background: #f3f4f6;
    color: #d77504;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    white-space: nowrap;
    display: inline-block;
}

.menu-item:hover {
    background: #ff6600;
    color: white;
}

.menu-item.logout {
    background: #dc3545;
    color: white;
}

.menu-item.logout:hover {
    background: #c82333;
    color: white;
}

.menu-toggle {
    display: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .menu-container {
        justify-content: space-between;
        flex-direction: row;
        padding: 0;
        position: relative;
        z-index: 10001;
    }

    .menu-toggle {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
        color: #d77504;
        font-size: 24px;
    }

    .menu-toggle svg {
        width: 24px;
        height: 24px;
        stroke: currentColor;
    }

    .menu-links {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        display: flex;
        flex-direction: column;
        gap: 0;
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 6px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        padding: 8px;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: max-height 0.3s, opacity 0.3s;
        z-index: 10000;
        margin-top: 4px;
        transform: translateZ(0);
    }

    .menu-links.active {
        max-height: 400px;
        opacity: 1;
    }

    .menu-item {
        width: 100%;
        text-align: left;
        padding: 10px 12px;
        background: transparent;
        box-shadow: none;
        border-radius: 4px;
        margin: 0;
    }

    .menu-item:hover {
        background: #f3f4f6;
        color: #d77504;
    }

    .menu-item.logout {
        background: transparent;
        color: #d77504;
    }

    .menu-item.logout:hover {
        background: #fed7d7;
        color: #dc3545;
    }
}

/* Documents 3x3 grid */
.docs-grid { max-width: 980px; margin: 24px auto; padding: 8px; }
.grid-3x3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; grid-auto-rows: auto; }
.doc-card { background: #ffffff; border-radius: 18px; box-shadow: 0 8px 24px rgba(16,24,40,0.08); display:flex; flex-direction:column; align-items:center; justify-content:flex-start; padding: 16px; text-align:center; color: #111827; min-height: 180px; }
.doc-card .doc-img { display:flex; align-items:center; justify-content:center; margin-bottom: 12px; gap: 8px; flex-wrap: wrap; }
.doc-card .doc-img img { width:72px; height:72px; object-fit:cover; border-radius:12px; display:block; flex-shrink: 0; }
.thumb-img { cursor: pointer; }
.thumb-img:hover { opacity: 0.8; }
.doc-title { font-size:14px; font-weight:600; margin-top:auto; }
.doc-card.placeholder { background: transparent; box-shadow: none; }

/* Upload button */
.upload-btn { 
    background: var(--brand-orange); 
    color: white; 
    border: none; 
    padding: 8px 12px; 
    border-radius: 6px; 
    font-size: 12px; 
    cursor: pointer; 
    margin-top: 8px;
    transition: background 0.3s ease;
}
.upload-btn:hover { background: #d97004; }
.upload-btn:active { background: #b35a03; }

.upload-buttons { display: flex; gap: 6px; margin-top: 8px; justify-content: center; }
.upload-btn-dual { margin-top: 0; }

.file-indicator { font-size: 11px; color: #666; margin-top: 4px; min-height: 16px; text-align: center; }
.file-indicator.selected { color: #28a745; font-weight: 600; }
.file-indicator.selected::before { content: '✓ '; }

.file-indicators { display: flex; gap: 6px; margin-top: 4px; justify-content: center; }
.file-indicators .file-indicator { flex: 1; }

.docs-action-bar { display: flex; justify-content: center; margin-top: 24px; padding: 16px 0; }
.save-docs-btn { background: var(--brand-orange); color: white; border: none; padding: 12px 32px; border-radius: 6px; font-size: 16px; font-weight: 600; cursor: pointer; transition: background 0.3s ease; }
.save-docs-btn:hover { background: #d97004; }
.save-docs-btn:active { background: #b35a03; }

.doc-upload-input { display: none; }

@media (max-width: 700px) {
    .grid-3x3 { grid-template-columns: repeat(2, 1fr); }
    .doc-card { min-height: 140px; }
    .doc-card .doc-img img { width:56px; height:56px; }
}

/* Lightbox Modal */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.8); padding: 24px; box-sizing: border-box; }
.modal.active { display: flex; align-items: center; justify-content: center; }
.modal-img, .modal-iframe { max-width: 90%; max-height: 90vh; object-fit: contain; border-radius: 8px; }
.modal-iframe { width: 80%; height: 80vh; border: none; background: white; }
.modal-img { display: block; }
.modal-close { position: absolute; top: 20px; right: 30px; color: #f1f1f1; font-size: 36px; font-weight: bold; cursor: pointer; }
.modal-close:hover { color: #bbb; }